[Tutor] Re: problems with re module

Thomi Richards thomi at imail.net.nz
Sat Nov 15 17:44:44 EST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>
> for col in CurrentLine:
>     print col
>     writeln('<entry>%s</entry>' % procol(col))
>
>
> My guess is that col is an empty list at some point.
>

nope ;) I've done this:

for col in CurrentLine:
	print "type of col is: %s \tCol is: %s" % (type(col),string.strip(col))
	writeln('<entry>%s</entry>' % procol(string.strip(col)) )
...

the output is:

<row>type of col is: <type 'str'>       Col is: Race


and then the traceback...

- -- 
Thomi Richards,
http://once.sourceforge.net/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/tqxc2tSuYV7JfuERAtbyAJ4kpAq2wijRZgO4NrJw8kRlNrBYNgCdGgeT
TovQe/guyM71Lo4sJOlPKaY=
=VHHa
-----END PGP SIGNATURE-----




More information about the Tutor mailing list