The error:
./ex.py: line 3: syntax error near unexpected token `('
./ex.py: line 3: `urls = ('

Is exactly what you get when you run a python script from the command line 
without an interpreter defined. It is treated as bash script by your 
operating system and therefore fails.

Try to run "python2 ex.py" or add "#!/usr/bin/python2" at the first line of 
your ex.py file.
Please note that python2 needs to be replaced by whatever your python2 
binary is named.

- vogan 

On Tuesday, 31 March 2015 03:22:11 UTC+2, Stephen Johns wrote:
>
> I followed the install page and created the example file:
>
> import web
>
> urls = (
>     '/', 'index'
> )
>
> class index:
>     def GET(self):
>         return "Hello, world!"
>
> if __name__ == "__main__":
>     app = web.application(urls, globals())
>     app.run()
>
> When I run this, I get the following error.  Do I have
>
>
> ./ex.py: line 3: syntax error near unexpected token `('
> ./ex.py: line 3: `urls = ('
>
> Using 
> > python --version
> Python 2.6.6
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to