Skip to content

Instantly share code, notes, and snippets.

@mdeous
Created July 12, 2013 12:39
Show Gist options
  • Save mdeous/5984151 to your computer and use it in GitHub Desktop.
Save mdeous/5984151 to your computer and use it in GitHub Desktop.
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