Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commands = {
- "start": start,
- "stop": stop,
- "quit": quit
- }
- while True:
- command = input("command: ").split()
- if command and command[0] in commands:
- try:
- command[0](*command[1:])
- except TypeError:
- print("Not enough arguments")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement