Closed Captioning Closed captioning available on our YouTube channel

How to use command line arguments in a Python script with sys.argv and argparse

InfoWorld | Mar 14, 2022

If you pass command line arguments to a Python script, it's easy to extract and use them with sys.argv. But if you want to build elaborate handlers for command-like arguments, the argparse module in Python's standard library gives you rich tools for doing that. Learn here how to add command-line argument handling to your script in both easy and powerful ways.

Copyright © 2022 IDG Communications, Inc.

Featured videos from