Create simple arg parse in python
argparse is a module to make user-friendly command-line interfaces. It’s probably the one of the most frequently used module when I create a script in python that needs to parse some arguments. Check this out. $ vim test.py #!/usr/bin/python import argparse def init_args(): parser = argparse. ArgumentParser(description=”This is the description”) parser.add_argument(“–arg1”, required=True, type=str, help=”This is … Read more