Created
October 16, 2018 00:34
-
-
Save alfakini/c434ce1ba8a48355e8d10bc1c7490700 to your computer and use it in GitHub Desktop.
Filesystem events monitoring with Python [events.py 2]
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
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