NetRock6
asked on
Python executable script
Hi,
Trying to convert a python script into executable one file using pyinstaller in Linux. In my python script using subprocess I call few bash files, what is the best way to add them to the
executable as well. I use the comamnd: "pyinstaller --one-file pythonscript" to build the executable.
Thank you for your quick prompts.
Trying to convert a python script into executable one file using pyinstaller in Linux. In my python script using subprocess I call few bash files, what is the best way to add them to the
executable as well. I use the comamnd: "pyinstaller --one-file pythonscript" to build the executable.
Thank you for your quick prompts.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How complex are these bash scripts?
If they're not too complex, you can use system calls in python to run the commands from the scripts, like this:
If they're not too complex, you can use system calls in python to run the commands from the scripts, like this:
import os
os.system("tail -10 somefile > somesmallerfile")
Then you could use pyinstaller to build your executable.
ASKER
My bash script is with .sh extension.
Thanks