Skip to content

Instantly share code, notes, and snippets.

@ijiraq
Created May 14, 2015 19:41
Show Gist options
  • Save ijiraq/966fbfd9360cae565c15 to your computer and use it in GitHub Desktop.
Save ijiraq/966fbfd9360cae565c15 to your computer and use it in GitHub Desktop.
How to add an argument that is boolean.
parser.add_argument("--fk", help="add the fk prefix on processing?",
default=False,
action='store_true')
args = parser.parse_args()
if args.fk:
# do something.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment