Skip to content

Instantly share code, notes, and snippets.

@sikli
Last active October 19, 2020 12:22
Show Gist options
  • Save sikli/863cdb6ec671a7972a20c0b509846323 to your computer and use it in GitHub Desktop.
Save sikli/863cdb6ec671a7972a20c0b509846323 to your computer and use it in GitHub Desktop.
"""
This script does something and returns something
"""
__author__ = ""
__copyright__ = ""
__license__ = ""
__version__ = "0.1"
__maintainer__ = ""
__email__ = "@"
__status__ = ""
import argparse
import sys
# Parser
parser = argparse.ArgumentParser(description="Description One.")
parser.add_argument("-i", "--Input", type=str, required=True,
help="Path to the input file")
parser.add_argument("-p", "--Param", default=10, type=int,
help="Some other optional parameter (default=10))
args = parser.parse_args()
if __name__ == "__main__":
# Input arguments
path = args.Input
param = args.Param
# Open and read
try:
#something
except:
raise Exception("Input File could not be read!")
#do some stuff here
sys.stdout.write(return_value)
sys.exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment