import sys print sys.argv[1]
Hi,
this may seem very simple, but I can't get Python to read anything from the command line. this is the code above and the type i am printing:
myfile.py helloworld
and I will return:
IndexError: list index out of range
It seems to work once for me, but it no longer works, and I tried uninstalling and reinstalling Python, but it still doesn't work.
So my question is: am I doing something wrong? or did i just break python?
Thanks for any help
Usage: Windows 7 Python 2.7.2
source share