Progress when parsing a large file with SAX

marc.omorain at gmail.com marc.omorain at gmail.com
Mon Feb 12 05:43:20 EST 2007


Hi there,

I have a 28mb XML file which I parse with SAX. I have some processing
to do in the startElement / endElement callbacks, which slows the
parsing down to about 60 seconds on my machine.

My application is unresponsive for this time, so I would like to show
a progress bar. I could show a spinner to show that the application is
responsive, but I would prefer to show a percentage. Is there any way
to query the parser to see how many bytes of the input file have been
processed so far?

Thanks,

Marc




More information about the Python-list mailing list