Watchdog

צילום מסך תוכנה:
Watchdog
פרטי תוכנה:
גרסה: 0.6.0
טען תאריך: 14 Apr 15
מפתחים: Gora Khargosh
רשיון: ללא תשלום
פופולריות: 3

Rating: nan/5 (Total Votes: 0)

Watchdog הוא API Python לעקוב אחר המתרחשים במערכת הקבצים.
כלב שמירה מאפשרת תוכניות פייתון לעקוב אחר המתרחשות במערכת הקבצים כportably כמו שימוש אפשרי:
* Inotify על לינוקס
* FSEvents ב- Mac OS X
* API של Windows ב- Windows
* קלפי כמנגנון חלופי
שימוש דוגמא:

 sys יבוא
זמן יבוא
מאובזרוור יבוא כלב השמירה, FileSystemEventHandler
רישום יבוא
logging.basicConfig (רמה = logging.DEBUG)
MyEventHandler כיתה (FileSystemEventHandler):
& Nbsp; & nbsp; & nbsp; catch_all_handler def (עצמי, אירוע):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; logging.debug (אירוע)
& Nbsp; & nbsp; & nbsp; on_moved def (עצמי, אירוע):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (אירוע)
& Nbsp; & nbsp; & nbsp; on_created def (עצמי, אירוע):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (אירוע)
& Nbsp; & nbsp; & nbsp; on_deleted def (עצמי, אירוע):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (אירוע)
& Nbsp; & nbsp; & nbsp; on_modified def (עצמי, אירוע):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (אירוע)
event_handler = MyEventHandler ()
משקיף = אובזרוור ()
observer.schedule ('א-ייחודי-שם ", event_handler, * sys.argv [1:])
observer.start ()
לנסות:
& Nbsp; & nbsp; & nbsp; בעוד אמיתי:
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; time.sleep (1)
מלבד KeyboardInterrupt:
& Nbsp; & nbsp; & nbsp; observer.unschedule ('א-ייחודי-שם ")
& Nbsp; & nbsp; & nbsp; (Observer.stop)
observer.join ()

דרישות :

  • Python
  • pyinotify

תוכנה דומה

ViperDB
ViperDB

3 Jun 15

zc.monitor
zc.monitor

14 Apr 15

busmon
busmon

20 Feb 15

squidGuard
squidGuard

3 Jun 15

תוכנות אחרות של יזם Gora Khargosh

squeeze
squeeze

14 Apr 15

תגובות ל Watchdog

תגובות לא נמצא
להוסיף הערה
הפעל את התמונות!