Thread
:
executing scripts via command line
View Single Post
•
•
Join Date: May 2008
Posts: 837
Reputation:
Solved Threads: 130
Paul Thompson
Offline
previously paulthom12345
Re: executing scripts via command line
0
#
4
Nov 21st, 2008
Your problem is that sys.argv is what you supply on the command line after starting the script. So you would go
Help with Code Tags
python Syntax
(
Toggle Plain Text
)
python mycode.
py
arg1 arg2
python mycode.py arg1 arg2
For yours to work you need at least 2 arguments for there to be sys.argv[1]
Make it idiot proof and someone will make a better idiot.
Check out my Site
|
and join us on IRC
|
Python Specific IRC
Paul Thompson
View Public Profile
Visit Paul Thompson's homepage!
Find all posts by Paul Thompson