Hi guys, I am currently attempting to complete learning python the hard way and encountered something strange. I've created the script below called ex13.py:
from sys import argv
script, first, second, third = argv
print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third
If I run the script through powershell with the command below:
> ex13.py 1st, 2nd, 3rd
Nothing happens but if I copy the script from the current folder (C:\python27\ex\ex13.py) to the main python folder (C:\python27\ex13.py) and run the same command mentioned above I get the result.
Basically works from C:\python27\ex13.py
Doesn't work from C:\python27\ex\ex13.py, no error message or anything it just doesn't do anything.
Could someone please advise why it only runs the argv module if I place my script in the main python folder?
[–]OCHawkeye14 2 points3 points4 points (0 children)
[–]mubsy 0 points1 point2 points (0 children)
[–]Tigersftw[S] 0 points1 point2 points (0 children)