Skip to content

Commit

Permalink
Merge pull request #63 from carpentries-lab/DamienIrving-patch-1
Browse files Browse the repository at this point in the history
Add script_template.py
  • Loading branch information
DamienIrving authored Jul 25, 2024
2 parents 9e5070e + 01ebe85 commit f8c1f19
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions code/script_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import argparse

#
# All your functions (that will be called by main()) go here.
#

def main(inargs):
"""Run the program."""

print("Input file: ", inargs.infile)
print("Output file: ", inargs.outfile)


if __name__ == "__main__":

description = "Print the input arguments to the screen."
parser = argparse.ArgumentParser(description=description)

parser.add_argument("infile", type=str, help="Input file name")
parser.add_argument("outfile", type=str, help="Output file name")

args = parser.parse_args()
main(args)

0 comments on commit f8c1f19

Please sign in to comment.