How can I read and process (parse) command line arguments?

In Python, how can we find out the command line arguments that were provided for a script, and process them?


Related background reading: What does "sys.argv[1]" mean? (What is sys.argv, and where does it come from?). For some more specific examples, see Implementing a "[command] [action] [parameter]" style command-line interfaces? and How do I format positional argument help using Python's optparse?.

← Назад к списку