python 将print输出保存到文本文件中

print输出到文本 import syspython print 'HEO=LLO' output=sys.stdout outputfile=open("D:\\DEM4\\2.txt","a") sys.stdout=outputfile编码 中文输出添加 type = sys.getfilesystemencoding()#python编码转换到系统编码输出spa
相关文章
相关标签/搜索