468,242 Members | 1,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,242 developers. It's quick & easy.

python newb question : how to pass arguments to a function using DOS cmd line

Hi ,
how can we pass arguments to a function located in xyz.py file using the DOS command Prompt.

I know its very easy to pass using the python command line but m finding it impossible to do this same thing on the DOS prompt.


[In Python command line, i used sys.argv[..] to pass the args ..BUT how should we pass arguments using DOS prompt]


-Megh
The trouble with being punctual is that nobody's there to appreciate it.
May 24 '07 #1
1 2234
bvdet
2,851 Expert Mod 2GB
Hi ,
how can we pass arguments to a function located in xyz.py file using the DOS command Prompt.

I know its very easy to pass using the python command line but m finding it impossible to do this same thing on the DOS prompt.


[In Python command line, i used sys.argv[..] to pass the args ..BUT how should we pass arguments using DOS prompt]


-Megh
The trouble with being punctual is that nobody's there to appreciate it.
sys.argv[i] is also used at the command prompt. Sample:
Expand|Select|Wrap|Line Numbers
  1. C:\python script.py arg1 arg2 arg3
May 24 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.