Skip to content

Instantly share code, notes, and snippets.

@alfakini
Created October 16, 2018 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfakini/c434ce1ba8a48355e8d10bc1c7490700 to your computer and use it in GitHub Desktop.
Save alfakini/c434ce1ba8a48355e8d10bc1c7490700 to your computer and use it in GitHub Desktop.
Filesystem events monitoring with Python [events.py 2]
def on_created(self, event):
file_size = -1
while file_size != os.path.getsize(event.src_path):
file_size = os.path.getsize(event.src_path)
time.sleep(1)
self.process(event)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment