Skip to content

Instantly share code, notes, and snippets.

@mkulak
Created December 17, 2011 21:32
Show Gist options
  • Select an option

  • Save mkulak/1491477 to your computer and use it in GitHub Desktop.

Select an option

Save mkulak/1491477 to your computer and use it in GitHub Desktop.
Notify about flash errors
import os
import time
filename = "/home/username/.macromedia/Flash_Player/Logs/flashlog.txt"
old_size= os.path.getsize(filename)
while True:
time.sleep(1)
new_size = os.path.getsize(filename)
if old_size != new_size:
f = open(filename)
f.seek(old_size)
old_size = new_size
content = f.read()
if "Error:" in content:
os.system('notify-send "Flash error" "' + content[:500] + '"')
@mkulak
Copy link
Copy Markdown
Author

mkulak commented Dec 17, 2011

Workaround for displaying flash exceptions in FP11 under Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment