Skip to content

Instantly share code, notes, and snippets.

@joetechem
Created November 3, 2016 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joetechem/77297ad532967c841828ca6c7acf030e to your computer and use it in GitHub Desktop.
Save joetechem/77297ad532967c841828ca6c7acf030e to your computer and use it in GitHub Desktop.
commands.py
# coding: utf-8
print("type command: hello")
COMMAND1 = "hello"
def handle_command(command):
"""
Determine if the command is valid. If so, take action and return
a response, if neccessary.
"""
response = ""
if command.find(COMMAND1) >= 0:
response = "huh?"
return response
while command.find(COMMAND1) >= 0:
handle_command(command)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment