I use web.py to write a small helloworld site, but when I run python code.py I get an error:
Traceback (most recent call last): File "E:\Python25\webpy\web\mysite.py", line 1, in <module> import web File "E:\Python25\webpy\web\web.py", line 4, in <module> app = web.application(urls, globals()) AttributeError: 'module' object has no attribute 'application'
Here is my code (paste from web.py tutorials):
import web urls = ( '/','Index', ) class Index: def GET(self): return "Hello,world!" app=web.application(urls,globals()) if __name__=="__main__": app.run(
PS: version web.py 0.35.
source share