I'm trying to execute a python script which is included in datas, and bundled into a pyinstaller executable (on a mac). I need to pass parameters to this script, so I can't just exec(open(read()). Outside of pyinstaller, sys.executable is the python interpreter, so calling the python script works fine. In pyinstaller, sys.executable is the 'main' py script, so it just opens up my app again instead of calling the new script. How can I call my additional python script inside my app? This is what I'm trying to acheive, which does not work with a bundled pyinstaller app:
subprocess.call([sys.executable, os.path.join(wd,"tests","errorMessage.py"), vArgument])