So, I'm parsing a log file that's being written out in real time. <logfile> <entry><timestamp>123</timestamp><details>foo</details> </entry> <entry><timestamp>456</timestamp><details>bar</details> </entry> <--- no </logfile>, coz the file hasn't yet been closed
This is part of an event loop, so I want to have some code that looks like this: when logfile is readable: read one <entry> node, including children but don't try to read past </entry>, so that the read won't block. Any clues greatly appreciated, Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list