2015年1月22日

python中的system函数与编码

摘要: 在调用os.system执行命令时,发现system不能接受unicode的命令。那么命令中却又包含以unicode表示的中文等字符怎么办?——方法就是将unicode转化为utf8path = u'我的文件.txt'cmd = 'process'cmd += ' '+ path.encode('u... 阅读全文

posted @ 2015-01-22 15:05 rainduck 阅读(775) 评论(0) 推荐(0) 编辑

导航