I have been looking for ways to add argument values to a script when I run it from the command line. The two packages I have found that seem to do this are sys.argv and argparse.
I'd also like to be able to add some sort of help function if possible.
Can somebody explain the difference between the two, and perhaps what would be easier for someone starting out?
sys.argvis not a package. You'd useargparse.sys.argvis a list of arguments.argparseis a package to help you deal with arguments (including adding a--helpargument).sys.argvis the list of strings derived from the commandline.argparselets you create a parser the can decodesys.argv. For simple cases you can usesys.argvdirectly.