oh, you can look 0.3 document.your test code is old.
http://webpy.org/tutorial3.en
app = web.application(urls, globals())
if __name__ == '__main__':
app.run()
--
http://chenxiaoyu.org/blog/
On Sun, Jan 24, 2010 at 3:19 AM, Dave Everitt <[email protected]>wrote:
> Just trying out web.py but fell at the first hurdle. Here's how it
> went:
> easy_install web.py
> - gets me version 0.33.
>
> I do the tutorial at http://webpy.org/tutorial2.en
> by making the executable file 'code.py':
>
> import web
>
> urls = (
> '/', 'index',
> '', 'index' )
>
> class index:
> def GET(self):
> print "Hello Web.py"
>
> if __name__ == "__main__": web.run(urls, globals())
>
> run it:
> python code.py
>
> get this traceback:
>
> File "code.py", line 13, in <module>
> if __name__ == "__main__": web.run(urls, globals())
> AttributeError: 'module' object has no attribute 'run'
>
> Background:
> I've been learning Django, but also messing with Ruby's Sinatra and
> Camping which gave me an appetite for something lighter. Having tried
> many other options, I've developed a developed a zero-tolerance for
> errors I can't solve quickly!
>
> Dave E.
>
> --
> 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] <webpy%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>
>
--
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.