Created
September 14, 2017 09:31
-
-
Save mgalardini/95f36698d206b3cd4368313278602143 to your computer and use it in GitHub Desktop.
Minimal python script template
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
#!/usr/bin/env python | |
'''Description here''' | |
import logging | |
import argparse | |
def get_options(): | |
description = '' | |
parser = argparse.ArgumentParser(description=description) | |
parser.add_argument('name', | |
help='Name') | |
return parser.parse_args() | |
def set_logging(level=logging.INFO): | |
logger = logging.getLogger() | |
logger.setLevel(level) | |
ch = logging.StreamHandler() | |
logger.addHandler(ch) | |
return logger | |
if __name__ == "__main__": | |
options = get_options() | |
logger = set_logging() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment