I am new to python and tkinter, but I made a Hangman game that uses two external text documents to get words (easy and hard). I want to convert it to.exe but when I try to use auto-py-to-exe, after it finishes converting, the.exe always gives a fatal error. I have tried a variety of settings (one file, one directory, including the text documents as additional files, etc) but the same thing occurs everytime. Any suggestions for settings to use to make it work or other methods to accomplish this?
Thanks!
you could do
file=open("./file.py","r")
content=file.read()
file.close()
file=open("./newfile.txt","w")
file.write(content)
file.close()
I think it will work
Have a nice day X)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.