> But now I have much weirder problem...
> I got this error:
>
> C:\>maillist.py
>   File "C:\maillist.py", line 84
>
>                                                                    ^
> SyntaxError: invalid syntax
>
> And the weird thing is that the program has only 83 lines... For some
> reason python thinks that I have a ^ on the 84 code line. Whats wrong ??



Hi Mark,

[meta: in your email reply, please just cut-and-paste the part that you're
responding to.]


Python error messages can put a carat symbol directly under the portion of
the code that looks weird, as a visual aid to the programmer.  For
example, if we have this program:

###
[EMAIL PROTECTED] dyoo]$ cat foo.py
  print foobar
###


then if we try to execute it, it'll break because the code is incorrectly
indented:

###
[EMAIL PROTECTED] dyoo]$ python foo.py
  File "foo.py", line 1
    print foobar
    ^
SyntaxError: invalid syntax
###

And here, the carat is meant for us to see that things start going wrong
starting at the 'print' statement.




The error message that you're seeing,

> C:\>maillist.py
>   File "C:\maillist.py", line 84
>
>                                                                    ^
> SyntaxError: invalid syntax

is also trying to say that line 84 of the program has strange syntax
that's inconsistent with the rest of the program.  Most likely, it's an
indentation error.  Check line 84 and see if it really is just an empty
line.



> BTW, I didn't wrote this program. I downloaded it (you can find the URL
> in my previous message) and started to read it so I could make some
> changes in it...

Hmmm.  The code does need a revision.

Maybe we can fix it up and send it back to the original authors, so that
no one else has to encounter the bugs and problems that you're running
into.  *grin*

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to