Class attributes / methods..... full Python script
__peter__ at web.de
Mon Mar 1 23:12:33 CET 2010
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
More information about the Python-list