I have a python command line script that may be used in two different ways.
First scenario is like this:
script.py -max MAX -min MIN -delta DELTA
where -max and -min are required arguments and -delta is optional.
The second scenario is:
script.py some_file.txt -f
where some_file.txt is required positional argument and -f is optional.
How do i implement that using any Python command line arguments parser (argparse, optparse, getopt, etc)?
UPDATE: script does only one thing - scrapes a site. But it's very long in time operation. In first case we run new scrape session while in second load earlier saved session and continue scrapping.