I'm making onefile executables with pyinstaller on windows 10. I'm including data files (pickle files) by editing the .spec file...
How can I store changes made to these files during run time? My understanding is that the data files are copied to a temp directory during execution. I can read from the files using the path I get from sys._MEIPASS but the changes I write are lost after restarting the program.
Is there a way to write to pickle files stored inside the exe?
答案 0 :(得分:0)
不要向pyinstaller提及pickle文件,并将pickle文件放在与捆绑的onefile相同的文件夹中。对我来说,即使文件夹中有两个文件而不是一个,这仍然有效。