commit ab8f84b11a06eea39b6e98bd0675cea1327b275f Author: morthimer Date: Wed Apr 24 15:16:03 2024 +0200 Upload files to "templates/python" diff --git a/templates/python/cli.py b/templates/python/cli.py new file mode 100644 index 0000000..6a9f26a --- /dev/null +++ b/templates/python/cli.py @@ -0,0 +1,16 @@ +import argparse + +class App: + def __init__(self): + self.args = self.parse_args() + + def parse_args(self): + args = argparse.ArgumentParser() + args.add_argument("echo", help="echo the string you use here", default="Hello World !") + return args.parse_args() + + def run(self): + print(self.args.echo) + +if __name__ == "__main__": + App().run() \ No newline at end of file