我用web.py写的小的HelloWorld网站,但是当我运行python code.py
我得到一个错误信息:Web.py - AttributeError的:“模块”对象有没有属性“应用”
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'
这里是我的代码(从web.py教程中粘贴):
import web
urls = ('/','Index',
)
class Index:
def GET(self):
return "Hello,world!"
app=web.application(urls,globals())
if __name__=="__main__":
app.run(
PS:web.py版本是0.35。
你的意思是我的网页模块与Web.py相冲突但是我找不到我的web.py :( – Xhinking
你在webpy \ web \?中有\ _ \ _init \ _ \ _。py吗? – Nix
是的,我在webpy \ web \ – Xhinking