Created
July 12, 2013 12:39
-
-
Save mdeous/5984151 to your computer and use it in GitHub Desktop.
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
| import os | |
| from time import sleep | |
| file_path = '/foo/bar/suce.txt' | |
| while True: | |
| if os.path.exists(file_path): | |
| data = open(file_path).read() | |
| # faire des trucs avec le contenu du fichier ici | |
| break | |
| else: | |
| sleep(0.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment