Created
December 17, 2011 21:32
-
-
Save mkulak/1491477 to your computer and use it in GitHub Desktop.
Notify about flash errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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] + '"') |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Workaround for displaying flash exceptions in FP11 under Linux