How do I include an output file when I convert a .py file to .exe using Pyinstaller?
I have a Python script that looks like path = os.path.join(os.path.dirname(sys.executable), ‘data.txt’) file = open(path, ‘w’) file.write("something") file.close() When I use Pyinstaller (with the option –onefile), and open the resulting .exe-file, it does not seem to do anything. In particular, I cannot find a data.txt file. How do I fix this? >Solution : os.path.dirname(sys.executable) would… Read More How do I include an output file when I convert a .py file to .exe using Pyinstaller?