Last active
March 18, 2020 22:01
-
-
Save arapat/d08352b7b35798e55f2f259520faf716 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class ClassName: | |
| def __init__(self): | |
| parser = argparse.ArgumentParser(description="") | |
| parser.add_argument("task", help="select the task to perform,") | |
| args = parser.parse_args(sys.argv[1:2]) | |
| getattr(self, args.task)() | |
| def task(self): | |
| parser = argparse.ArgumentParser(description="") | |
| parser.add_argument("--arg", help="") | |
| args = parser.parse_args(sys.argv[2:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment