Skip to content

Instantly share code, notes, and snippets.

@denisb411
Last active August 26, 2020 01:39
Show Gist options
  • Save denisb411/c87ee7fa6e8e844b1775bf76a74c0439 to your computer and use it in GitHub Desktop.
Save denisb411/c87ee7fa6e8e844b1775bf76a74c0439 to your computer and use it in GitHub Desktop.
A template I use for my python scripts
from argparse import ArgumentParser
__author__ = ""
__date__ = ""
__version__ = ""
__description__ = ""
if __name__ == '__main__':
argParser = ArgumentParser(description=__description__,
epilog='Developed by ' + __author__ + ' in ' + __date__)
argParser.add_argument('-i', '--input', dest="input", type=str, default='')
argParser.add_argument('-o', '--output', dest="output", type=str, default='')
argParser.add_argument('--files', nargs='*', help='Receives array')
argParser.add_argument('--flag', dest="flag", action='store_true')
args = argParser.parse_args()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment