From the script side:
It is easy to parse the called bat output and get the information you need without an exit code. You can use the subprocess command and the communicate method to parse the output. As reported in the python help:
https://docs.python.org/2/library/subprocess.html
output=`dmesg | grep hda`
# becomes
p1 = Popen(["dmesg"], stdout=PIPE)
p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
output = p2.communicate()[0]
From the DOS side:
You can use the "exit" command:
exit /b %errorlevel%
And use errorlevel for your purpouse.
Please, for more info, look at:
http://www.computerhope.com/exithlp.htm
Another option is to use and environment variable with the command "setx" (which uses a register and it is not volatile), or a file as a temp storage.