script wont accept parameters at command line

Joined
Sep 22, 2008
Messages
1
Reaction score
0
Hi,
I'm very new to Python and have been using it for very simple automation scripts so far. Until now, I have been running my scripts from within Pythonwin and ArcGIS software with great success. However, I'd like to start running from the command line now, but Python will not read in my parameters.

For example, my script called script1.py is only these three lines:

import sys
params = sys.argv[0:]
print params

This is what I type at the command line:
script1.py param1 param2 param3

This is the result:
['C:\\scripts\\script1.py']

Why will it not read in my other parameters? I have PY files set to run with Python.exe. Is there something else I have to set up on my machine? Any help would be great.

thanks,
Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top