I have the following code in my batch file
@ECHO OFF
SET /P NAME=Enter name:
SET /P GENDER = Enter age:
SET /P AGE = Enter gender:
python test.py %NAME% %GENDER% %AGE%
PAUSE
Here is the code in test.py
import sys
print len(sys.argv)
for arg in sys.argv:
print arg
Here is the output
Enter name:Dodo
Enter age:1
Enter DB gender:M
2
test.py
Dodo
Press any key to continue . . .
I am using python2.5. How do i pass the age and gender as well? I'm new to both python and batch programming, so go easy on me :)