I am new to python and would like to give the arguments to a script as in-line arguments after the script name.
For example: given the script
mypython_script.py
I would like to launch it from terminal in the following way:
python3.4 mypython_script.py argument_1=5.0, argument_2=12.3, nome_file='out_put.dat'
I am able to read/print into terminal via the following command:
print ('Input Argument_1')
string_input= input()
Argument_1=float(string_input)
print('Argument_1 %f ' % Argument_1)
print ('Input Argument_2')
string_input= input()
Argument_2=float(string_input)
print('Argument_2 %f ' % Argument_2)
print ('Input nome_file')
nome_file= input()
print('nome_file %s ' % nomefile)
But in order to do this I have to interact with the program, my question is: how can I give to the script all the arguments in the line in which I execute it from shell?