Created
January 7, 2018 18:36
-
-
Save tanyuan/6895588c2973bc9703cf2e4f82b99ee5 to your computer and use it in GitHub Desktop.
Python args template: read shell arguments
This file contains 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
import argparse | |
if __name__ == '__main__' : | |
parser = argparse.ArgumentParser(description='Program description') | |
parser.add_argument('input', help='Input file') | |
parser.add_argument('-o', '--option', type=int, help='Integer option') | |
args = parser.parse_args() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment