On Mar 15, 2005, at 16:44, Ron Nixon wrote:

Kent:

The code is below. Here's the error message.

Traceback (most recent call last):
  File "C:/Python24/reformat.py", line 5, in
-toplevel-
    name = x.group(1)
AttributeError: 'list' object has no attribute 'group'

re.findall returns a list object (as the error message says). Use name = x[1] instead. (and be careful, numbering starts from 0, so this code may contain a Kenobi error).


-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?"


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to