nonblocking read of one xml element?

mh at mh at
Tue Feb 5 07:09:11 CET 2008

So, I'm parsing a log file that's being written out in
real time.

             <--- 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 Harrison
Pixar Animation Studios

More information about the Python-list mailing list