2007年11月21日 星期三 17:09
Marco,您好!
这里有说这个问题
http://www.pythonid.com/bbs/viewthread.php?tid=1111&extra;=page%3D1
======= 2007-11-21 16:28:50 您在来信中写道:=======
>import sys
>import web
>
>urls = ('/', 'index')
>
>class index:
> def GET(self):
> print dir(self)
>
>#web.webapi.internalerror = web.debugerror
>##########################
>if __name__ == '__main__':
> web.run(urls, globals())
>
>
>这是web.py上的例子, 请问, 如何才能处理浏览器发来的数据(http GET/POST的参数)呢?
>
>谢谢!
>
>--
>LinuX Power
>_______________________________________________
>python-chinese
>Post: send python-chinese在lists.python.cn
>Subscribe: send subscribe to python-chinese-request在lists.python.cn
>Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
>Detail Info: http://python.cn/mailman/listinfo/python-chinese
= = = = = = = = = = = = = = = = = = = =
致
礼!
赵威
zhaowei在pythonid.com
2007-11-21
2007年11月21日 星期三 17:37
#!/usr/bin/python #Filename: http-server.py import sys import web urls = ( '/xml:(.*)', 'RAW_XML', '/', 'index' ) class RAW_XML: def GET(self, val): print val class index: def GET(self): print 'hello world' data = web.input() for key in data.keys(): print key, '->', data[key] #web.webapi.internalerror = web.debugerror ########################## if __name__ == '__main__': web.run(urls, globals()) 可以了, 用了大家说的两种方法, 看来还是得看源代码 On 11/21/07, 赵威 <zhaowei在pythonid.com> wrote: > Marco,您好! > > 这里有说这个问题 > > http://www.pythonid.com/bbs/viewthread.php?tid=1111&extra;=page%3D1 > > ======= 2007-11-21 16:28:50 您在来信中写道:======= > > >import sys > >import web > > > >urls = ('/', 'index') > > > >class index: > > def GET(self): > > print dir(self) > > > >#web.webapi.internalerror = web.debugerror > >########################## > >if __name__ == '__main__': > > web.run(urls, globals()) > > > > > >这是web.py上的例子, 请问, 如何才能处理浏览器发来的数据(http GET/POST的参数)呢? > > > >谢谢! > > > >-- > >LinuX Power > >_______________________________________________ > >python-chinese > >Post: send python-chinese在lists.python.cn > >Subscribe: send subscribe to python-chinese-request在lists.python.cn > >Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > >Detail Info: http://python.cn/mailman/listinfo/python-chinese > > = = = = = = = = = = = = = = = = = = = = > > > 致 > 礼! > > > 赵威 > zhaowei在pythonid.com > 2007-11-21 > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- LinuX Power
2007年11月21日 星期三 18:41
webpy 有好几份文档,有教程的中文翻译是有 web.input() 介绍的。。 不过如果要用 webpy 开发正式产品,现有的这些文档是不够的,必须读代码. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20071121/175d73d2/attachment.html
Zeuux © 2025
京ICP备05028076号