I have a batch file that runs a python script. I am running Python 3.2. I want to send a variable like an integer or string from the python script back to the batch file, is
If a int is enough for you, then you can use
int
sys.exit(value)
in your python script. That exits the application with a status code of value
value
In your batch file you can then read it as the %errorlevel% environment variable.
%errorlevel%