From: Peter Otten on 1 Mar 2010 17:12
Gabor Urban wrote:
> thanks for the ideas. Here you are the code. Not transcoded from Java
> for I do not know Java enough..
> I am scanning an XML file, and have a large ammount of logging.
> Any ideas are wellcome as before....
Replace Package (the class) with package (an instance).
> for i in xrange(oplines.length):
Python lists don't have a length attribute. You can determine their length
with len(oplines). To iterate over the items of a list you need not know the
for line in oplines:
which can be simplified to
PS: Rrread the tutorial