1
wxq552 OP 这是我的HelloWorld代码
#encoding: utf-8 import web urls = ("/.*", "hello") app = web.application(urls, globals()) class hello: def GET(self): return 'Hello, world!' if __name__ == "__main__": app.run() |
2
allenforrest 2014-07-15 17:09:49 +08:00
声明的是 utf-8,但实际保存的 py 文件编码不是 utf-8的,检查你的编辑器
|
3
tonyluj 2014-07-15 17:29:41 +08:00
用notepad++,utf-8编码
editor用vim吧,早用早幸福 |
4
BiggerLonger 2014-07-15 17:46:44 +08:00
'Hello world'.decode('utf-8') 试试
|