首页 > 代码库 > encoding declare

encoding declare

SyntaxError: Non-ASCII character ‘\xe6‘ in file google.py on line 17, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

 

Add the  # -*- coding: utf-8 -*-  line to the beginning of the file.

e.g.

#!/usr/bin/env python# -*- coding: utf-8 -*-