#!/home/talen/python2.7/bin/python
#coding=UTF8 加入这么一句话.
#打印信息
print "hello world! "
#打印出你输入的名字
name=raw_input("What is your name ?")
print "Hello , "+name+ " ! "
#保持窗口不关闭
raw_input("Press ")
[t@bjb0541 python]$ ./1.py
File "./1.py", line 2
SyntaxError: Non-ASCII character '\xe6' in file ./1.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
[t@bjb0541 python]$ vim 1.py
#!/bin/env python
#! -*- coding:utf-8 -*-
print '我是中国人'
[t@bjb0541 python]$ ./1.py
我是中国人
[t@bjb0541 python]$ ./1.py
File "./1.py", line 2
SyntaxError: Non-ASCII character '\xe6' in file ./1.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
[t@bjb0541 python]$ vim 1.py
#!/bin/env python
#! -*- coding:utf-8 -*-
print '我是中国人'
[t@bjb0541 python]$ ./1.py
我是中国人