[EMAIL PROTECTED] wrote: > I'm parsing a log file that's being written out in > real time. > 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.
Do you have any control over the program that writes the log file? Maybe you could make it write the log to a pipe or socket instead, which you could then connect an XML parser to from the Python side (maybe from a thread to avoid blocking I/O). Stefan -- http://mail.python.org/mailman/listinfo/python-list