On Mon, 2009-04-27 at 08:30 -0700, Alex wrote:
> 1. I put the "web" directory to my app root.
> 2. I created code.py:
> 
> import web
> 
> urls = (
>   '/', 'index',
>   '',  'index'    )
> 
> class index:
>     def GET(self):
>         print "Hello, world!"
> 
> if __name__ == "__main__": web.run(urls, globals())
> 
> 3. I ran python code.py
> 4. Python said:
> 
> Traceback (most recent call last):
>   File "code.py", line 11, in <module>
>     if __name__ == "__main__": web.run(urls, globals())
> AttributeError: 'module' object has no attribute 'run'
> 
> What am I doing wrong?

It looks like you are using the instructions for web.py 0.23, but
running web.py 0.3

Try:

if __name__ == "__main__":
  app = web.application(urls, globals())
  app.run()

Mark


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to