|
|
居然报错,SyntaxError: Non-ASCII character '\xd6' in file F:\python\src\frist.py on line 2, but no encoding declared; see python.org/peps/pep-0263.html">http://www.python.org/peps/pep-0263.html for details
但是在idle中没有问题,可以输出。
经过google大师的指引,找到一片文章,说要在文件头加入# -*- coding: gb18030 -*-
才能支持中文。试验了下真的成功了。
文章评论
共有 位脚本之家网友发表了评论我来说两句