diff --git a/README.md b/README.md index 539ebf1f..9eeb57a9 100644 --- a/README.md +++ b/README.md @@ -90,12 +90,12 @@ Download and extract the source code of the [latest release](https://github.com/ Mac: -* Requires the Python “requests” module - install this with `easy_install requests` . +* Requires the Python “requests” and “watchdog” modules - install these with `easy_install requests watchdog` . * Run with `./EDMarketConnector.py` . Windows: -* Requires Python2.7 and the Python “requests” module. +* Requires Python2.7 and the Python “requests” and “watchdog” modules. * Run with `EDMarketConnector.py` . Linux: diff --git a/monitor.py b/monitor.py index 57622215..01d832bb 100644 --- a/monitor.py +++ b/monitor.py @@ -8,17 +8,18 @@ from sys import platform from time import strptime, localtime, mktime, sleep, time from datetime import datetime -from watchdog.observers import Observer -from watchdog.events import FileSystemEventHandler - if __debug__: from traceback import print_exc if platform=='darwin': from AppKit import NSWorkspace from Foundation import NSSearchPathForDirectoriesInDomains, NSApplicationSupportDirectory, NSUserDomainMask + from watchdog.observers import Observer + from watchdog.events import FileSystemEventHandler elif platform=='win32': + from watchdog.observers import Observer + from watchdog.events import FileSystemEventHandler import ctypes CSIDL_LOCAL_APPDATA = 0x001C @@ -63,6 +64,9 @@ elif platform=='win32': return False # stop enumeration return True +else: + FileSystemEventHandler = object # dummy + class EDLogs(FileSystemEventHandler):