笔者使用Python3.6.1版本试验了下中文支持,直接上结果感受下:
import subprocess
from Conf.全局配置文件 import 是否启用全局配置
class 安卓支持包:
def 获取截图(self):
中国 = "中国"
print(中国)
s = subprocess.getoutput("adb pull /sdcard/screenshot_auto.png Log/screenshot_auto.png")
if "no devices" in s:
return False
else:
return True
print(是否启用全局配置)
安 = 安卓支持包()
安.获取截图()
输出结果:
True
中国
神不神奇? 强不强大?
以后再也不用担心团队之间英文命名的难以理解了!
笔者试着搜了下,原来Python3.0就已经支持unicode定义啦!详情见:Python官网文档unicode定义支持
还没试用过的小伙伴儿们快试试吧!
网友评论