0

I am looking to parse a log produced by an external program. This log is parsed into a list which is then served to a front-end application.

This questions covers how to continuously read a file; however, my application needs to be doing other things the time.sleep(1) period.

Ideally, I would be able to call a function, say parse_log(log_list), and have the results of the parsing be appended to log_list. Additionally, I should be able to clear log_list outside of the parser without breaking anything.

Bonus challenge: Functionality to pause and resume parsing.

Edit: Preferably cross-platform.

3
  • nowait I/O (e.g. the select system call in Linux instead of sleep) or perhaps inotify Commented Jun 25, 2015 at 0:08
  • See unix.stackexchange.com/questions/45626/… Commented Jun 25, 2015 at 0:11
  • I can't find the first and I'm not clear on how to use Pyinotify to achieve what I asked. Commented Jun 25, 2015 at 0:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.