标签:blog class code ext int string 2014 文件 http html 404
错误信息如下:
File "E:\work\pydev\pythodemo\src\code\string.py", line 1
SyntaxError: Non-ASCII character ‘\xe5‘ in file E:\work\pydev\pythodemo\src\code\string.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
错误图如下:
源代码:
dic = {"name":"张三","age":30,"gender":"男"} print dic
解决方法:
源码文件第一行加上:
# -*- coding: utf-8 -*-
解决eclipse编辑python程序的SyntaxError: Non-ASCII character错误,码迷,mamicode.com
解决eclipse编辑python程序的SyntaxError: Non-ASCII character错误
标签:blog class code ext int string 2014 文件 http html 404
原文地址:http://blog.csdn.net/enson16855/article/details/24800933