Created
March 2, 2018 04:26
-
-
Save jdunne/821109da28092aea05a01b0776a5ec40 to your computer and use it in GitHub Desktop.
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
commands = {} | |
def command(function): | |
commands[function.__name__] = function | |
@command | |
def us_command(context): | |
print("us_command - " + str(context)) | |
@command | |
def emea_command(context): | |
print("emea_command - " + str(context)) | |
@command | |
def apac_command(context): | |
print("apac_command - " + str(context)) | |
def main(): | |
cmd = commands["emea_command"] | |
cmd('hello') | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment