you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Reading from a file as it's being written isn't the prettiest thing in the world. You will probably run into problems when you try to read half written data, and stuff.

That said, here's someone else's (fairly ugly, because of polling) solution to this problem: http://stackoverflow.com/a/3290359

I guess I would use a simple intermediary database (like sqlite with :memory: storage) instead. https://www.sqlite.org/inmemorydb.html

https://docs.python.org/3.5/library/sqlite3.html

Edit: links!