python编码

2017-04-22  本文已影响0人  随玉而安_gao

File "test.py", line 2

SyntaxError: Non-ASCII character '\xe4' in file test.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

如果运行python脚本过程中出现如下问题:可以在文件开头加入:

# -*- coding: UTF-8 -*-  或者:#coding=utf-8

上一篇下一篇

猜你喜欢

热点阅读