I am having trouble in figuring out what's the argv
meant in an earlier exercise of Learning Python the Hard Way (exercise 13, I've read the post on Stack Overflow and still can't understand it).
Could someone explain to me what's the meaning of the 3rd line in the code
script, filename=argv
Why is there must be a "script" in the variable argv
?
from sys import argv
script, filename = argv
txt = open(filename)
print "Here's your file %r:" % filename
print txt.read()
print "Type the filename again:"
file_again = raw_input("> ")
txt_again = open(file_again)
print txt_again.read()