I have a python script like this:
#I'm treating with text files
input = str(raw_input('Name1: '))
output = str(raw_input('Name2: '))
inputFile = open(input, 'r')
outputFile = open(output, 'w')
def doSomething():
#read some lines of the input
#write some lines to the output file
inputFile.close()
outputFile.close()
So, you have to put the name of the input file and the name of the output after you call the script in a shell:
python script.py
But I wonder if it's possible to call directly the input file and set the name of the output file by the time I'm calling the script, so the syntax of the calling will be something like:
python script.py inputFile.txt outputFile.txt
Then, it makes the same than the other, but without using the raw_input method. How can I make this?