Skip to content

Instantly share code, notes, and snippets.

@labeneator
Created January 28, 2014 22:11
Show Gist options
  • Save labeneator/8677611 to your computer and use it in GitHub Desktop.
Save labeneator/8677611 to your computer and use it in GitHub Desktop.
This will fail to read a FIFO if writers disappear
while True:
self.logger.info("[Re]starting to read %s" % self.input_file)
with open(self.input_file, "rb") as f:
for line in f:
...do_stuff_with_line...(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment