View Single Post
Join Date: May 2008
Posts: 837
Reputation: Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about 
Solved Threads: 130
Sponsor
Paul Thompson's Avatar
Paul Thompson Paul Thompson is offline 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
  1. 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
Reply With Quote