我在文件中编写文字的代码:
file = open('folder\text.txt', 'w')
file.write(string.encode('utf-8'))
file.close()
我的setup.py文件:
from distutils.core import setup
import py2exe
setup(
console=[{"script":"main.py"}],
options={"py2exe": {"includes":["requests"]}}
)
P.S。 - windows