> this one fails:
> [EMAIL PROTECTED]:~/wxpy$ cat helloWorld.py
>
> #!/usr/bin/python

Hi Matt,

Ah, good for showing that cat command: it gave enough hints that we can
tell what's going on.


Take out the leading empty space in your file; it's interfering with the
magic line '#!/usr/bin/python'.


The error message you're seeing isn't Python:

> [EMAIL PROTECTED]:~/wxpy$ ./helloWorld.py
> ./helloWorld.py: line 6: syntax error near unexpected token `('
> ./helloWorld.py: line 6: `class MainWindow(wx.Frame):'

It's actually Bourne shell trying to interpret your program as Bourne
shell commands.  *grin*


Here's a session that verifies that those errors are symptomatic of
'/bin/sh' error messages:

######
[EMAIL PROTECTED] ~]$ cat foo.py
class Foo(object):
    pass
[EMAIL PROTECTED] ~]$ /bin/sh foo.py
foo.py: line 1: syntax error near unexpected token `('
foo.py: line 1: `class Foo(object):'
######


Hope this helps!

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

Reply via email to