jmares / argparse

Learning, playing, experimenting and testing the argparse python module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Argparse

Learning, playing, experimenting and testing the argparse python module

Argparse Tutorial

No pip install needed.

  • Source: Argparse Tutorial
  • The Basics
    • prog1.py
  • Introducing Positional Arguments
    • prog2.py
    • prog3.py
  • Introducing Optional Arguments
    • prog4.py
    • prog5.py
  • Short Options
    • prog6.py
  • Combining Positional and Optional arguments
    • prog7.py
    • prog8.py
    • prog9.py
    • prog10.py
    • prog11.py
    • prog12.py
  • Getting a little more advanced
    • prog13.py
    • prog14.py
  • Conflicting Options
    • prog15.py
    • prog16.py

Exceptions

How do you deal with exceptions? Adding exit_on_error=False might help but it looks more complicated than that:

parser = argparse.ArgumentParser(exit_on_error=False)

About

Learning, playing, experimenting and testing the argparse python module


Languages

Language:Python 100.0%