When I pass a variable to a BAT file using the following:
from subprocess import call
# Prompt for UID
UID = raw_input('Enter UID: ')
# Prompt for password
PSWD= raw_input('Enter your password: ')
dir = r"f:\_Python"
cmdline = "setENVvariables.bat UID, PSWD"
rc=call("start cmd /K " + cmdline, cwd=dir, shell=True)
.. the values are not passed. When I echo the input in the BAT file, I get the Python variable name
BAT file
echo %1
echo %2
BAT File output
f:\_Python>echo UID
UID
f:\_Python>echo PSWD
PSWD
f:\_Python>