So, i have managed to create an executable file in windows, out of a python script using pyinstaller
. I tried pyinstaller myscript.py
and the buid and dist folders were created, along with the .spec
file
However, at a later time, i am making changes to the underlying code. So what i need to do is recompile and my application works again.
But, is there a way in which i can edit the already existing application? Or do i have to always recompile, after making a change ?
Also, what is the purpose of the .spec
file?
EXE and DLL files are not plain, traditional text files that you can easily read and edit. You cannot simply open up an . EXE like a document file and start editing or reading the contents.
PyInstaller Extractor is a Python script to extract the contents of a PyInstaller generated executable file. The header of the pyc files are automatically fixed so that a Python bytecode decompiler will recognize it. The script can run on both Python 2. x and 3.
Spec-file is needed to keep some options for pyinstaller to build your project such as hidden imports, attached data files, the name of output exe-file, etc. It is always created by using pyinstaller first time. Next time if you want to build your changed project use this command specifying the spec-file:
$ pyinstaller myscript.spec
For more information about spec-files read documentation: https://pyinstaller.readthedocs.io/en/stable/spec-files.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With