dungeoneer-cs/repl.py

15 lines
201 B
Python
Raw Normal View History

def repl_loop():
while True:
raw = input("> ")
if raw == 'exit':
break
parts = raw.split(" ")
command = parts[0]
del parts[0]
if command in repl:
repl[command](parts)
repl_loop()