If suppose I use the function execfile in my python script and then I use pyinstaller to convert that python script into an executable file then will that executable file work?What pyisntaller does is look for import statement and then include those modules which are mentioned in the import statement of my script.The images that I include in my script can be dealt with by copying them into the dist folder which pyinstaller creates but how to deal with the script that I mention in the execfile function.
I just want to know a method of converting a python script that contains execfile (which calls another script from within the original script) into an executable file
You can tell PyInstaller which files to include in the dist folder. Include all .py
files you need. When calling execfile
, specify the correct directory name (you have to figure this one out).