I having problems to run a python script inside the git-bash environment.
My app is running (for now) from an exe-container (py2exe) and it should just execute another python script, but inside the git-bash environment.
The app and the git-bash.exe are inside the same directory (the entire portable version of git is extracted into this folder).
The second script I want to run is in a subfolder named scripts.
Here the python file, which will be compiled as the self executable: import os
try:
root = os.path.dirname(__file__)
except:
root = os.path.dirname(sys.argv[0])
git = os.path.join(root,"git-bash.exe")
gitScript = os.path.join(root,"scripts","git_deploy.py")
I was trying different variations, but without any success:
# 1st try:
subprocess.Popen(["python", gitScript], executable=git)
# 2nd try:
subprocess.Popen(["python %s"%gitScript], shell=True, executable=git)
# 3rd try:
subprocess.Popen(["-c", "python", gitScript], executable=git)
# 4th try:
subprocess.Popen([git, "python", gitScript])
# 5th try:
subprocess.Popen([git, "-c", "python", gitScript])
Any idea what I doing wrong here?
Thanks