If I double click python.exe, it launches the python.exe process which includes a window and the interpreter running in it.
If I call python.exe from the cmd prompt, it launches the python interpreter inside the cmd shell, maintaining any cmd functionality.
Is there a way to replicate this with a batch script that calls python.exe?
I want to launch python.exe after setting some environment variables. Currently I am doing this using:
start "" python.exe %*
Which will launch the python.exe window+interpreter when I double click. It also launches it when calling the command from the cmd prompt, instead of opening the interpreter in the cmd shell.
If I just call python.exe directly in the bat file:
python.exe %*
It will open the python interpreter in a cmd shell when double-clicked or called from an existing shell.
Can I have both behaviors? Is there any way to do what I want?