Sublime Text编辑python程序中文注释报错

代码:

#中文注释
month = []

 

报错内容:SyntaxError: Non-ASCII character '\xe4' in file date.py on line 1, but no encoding declared; see

http://www.python.org/peps/pep-0263.html for details

解决方法:

在py文件第一行添加注释

#encoding=utf-8
#中文注释
month = []

 

posted @ 2013-04-03 10:31  Simple Happiness  阅读(1568)  评论(0编辑  收藏  举报