- 
      
- 
        Save s-boardman/efe57366f8bd040e3c39 to your computer and use it in GitHub Desktop. 
Revisions
- 
        s-boardman revised this gist Jul 1, 2015 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,13 @@ # argparse section import argparse parser = argparse.ArgumentParser() parser.add_argument("-l","--list", help="pass a list", nargs="*") parser.add_argument("-b","--boolean", action="store_true", default=False, help="use this flag to turn on an option") # grab the options here from the command line, console overrides email args = parser.parse_args() list = args.list if args.boolean is True: boolean = True 
- 
        s-boardman revised this gist Feb 10, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # argparse section import argparse parser = argparse.ArgumentParser() parser.add_argument("-e","--email", help="send to specific email") parser.add_argument("-c","--console", action="store_true", default=False, help="push results to stdout") # grab the options here from the command line, console overrides email args = parser.parse_args() 
- 
        kmanalo created this gist Nov 12, 2014 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # argparse section import argparse parser = argparse.ArgumentParser() parser.add_argument("--email", help="send to specific email") parser.add_argument("--console", action="store_true", default=False, help="push results to stdout") # grab the options here from the command line, console overrides email args = parser.parse_args()