Created
October 10, 2020 02:23
-
-
Save xinyazhang/f39b414ebf4e2b626c2aa75654946539 to your computer and use it in GitHub Desktop.
Python CLI Tool Starter Code
This 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 characters
| #!/usr/bin/env python3 | |
| import argparse | |
| def parse(): | |
| p = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) | |
| p.add_argument('example', help='Example usage of parser', type=float, default=0.0) | |
| args = p.parse_args() | |
| # print(args) | |
| return args | |
| def main(): | |
| args = parse() | |
| if __name__ == '__main__': | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment