Watchdog

Szoftver screenshot:
Watchdog
Szoftver adatai:
Változat: 0.6.0
Feltöltés dátuma: 14 Apr 15
Fejlesztő: Gora Khargosh
Engedély: Ingyenes
Népszerűség: 3

Rating: nan/5 (Total Votes: 0)

Watchdog egy Python API ellenőrzésére fájlrendszer eseményeit.
Watchdog lehetővé teszi a Python programok nyomon követése fájlrendszer eseményeit, mint portably felhasználásával lehetséges:
* Inotify a Linux
* FSEvents a Mac OS X
* Windows API Windows
* Szavazóhelyiségek csak meghibásodás mechanizmus
Példa felhasználás:

 import sys
import ideje
a watchdog import Observer, FileSystemEventHandler
import naplózás
logging.basicConfig (level = logging.DEBUG)
osztály MyEventHandler (FileSystemEventHandler):
& Nbsp; & nbsp; & nbsp; def catch_all_handler (self, esemény):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; logging.debug (esemény)
& Nbsp; & nbsp; & nbsp; def on_moved (self, esemény):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (esemény)
& Nbsp; & nbsp; & nbsp; def on_created (self, esemény):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (esemény)
& Nbsp; & nbsp; & nbsp; def on_deleted (self, esemény):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (esemény)
& Nbsp; & nbsp; & nbsp; def on_modified (self, esemény):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; self.catch_all_handler (esemény)
event_handler = MyEventHandler ()
megfigyelői = Observer ()
observer.schedule ("a-egyedi-name ', event_handler, * sys.argv [1:])
observer.start ()
Próbálja ki:
& Nbsp; & nbsp; & nbsp; míg a True:
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; time.sleep (1)
kivéve KeyboardInterrupt:
& Nbsp; & nbsp; & nbsp; observer.unschedule ("a-egyedi-name ')
& Nbsp; & nbsp; & nbsp; observer.stop ()
observer.join ()

követelmények :

  • Python
  • pyinotify

Hasonló program

Acovea/GTK
Acovea/GTK

3 Jun 15

aerotools-ng
aerotools-ng

20 Feb 15

celerymon
celerymon

20 Feb 15

check_tcptraffic
check_tcptraffic

15 Apr 15

Más szoftver fejlesztő Gora Khargosh

squeeze
squeeze

14 Apr 15

Hozzászólások a Watchdog

Hozzászólás nem található
Megjegyzés hozzáadása
Kapcsolja be a képeket!