falldog 发表于 2017-4-25 07:49:16

python脚本程序包含中文字符

  python脚本程序包含中文字符:
  异常信息:
  SyntaxError: Non-ASCII character '\xe7' in file ./xylon on line 14, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  解决:将以下三行放在脚本的最顶部。
  #! /usr/bin/python
  # coding=utf-8
  # _*_ coding:utf8 _*_
页: [1]
查看完整版本: python脚本程序包含中文字符