To develop this task, the best thing is to use the argparse module that comes installed by default when you install Python.
The following is an example of how to use it in our scripts:
You can find the following code in the filename testing_parameters.py
import argparseparser = argparse.ArgumentParser(description='Testing parameters')parser.add_argument("-p1", dest="param1", help="parameter1")parser.add_argument("-p2", dest="param2", help="parameter2")params = parser.parse_args()print params.param1print params.param2
In the params variable, we have the parameters that the user has entered from the command ...