Below is the file 'Interface.py' from this revision. You can also download the file.
#!/usr/bin/env python # Interface.py # Utilities associated with command line UI import sys def fourstar_prompt(state, event, params, v, vstatus): sys.stdout.write("fourstar> ") vstatus.change_state(state, vstatus.counter + 1) def chart_prompt(state, event, params, v, vstatus): sys.stdout.write("fourstar-chart> ") vstatus.change_state(state, vstatus.counter + 1) def ledger_prompt(state, event, params, v, vstatus): sys.stdout.write("fourstar-ledger> ") vstatus.change_state(state, vstatus.counter + 1) def journal_prompt(state, event, params, v, vstatus): sys.stdout.write("fourstar-journal> ") vstatus.change_state(state, vstatus.counter + 1) def command_input(state, event, params, v, vstatus): foo = sys.stdin.readline() vstatus.change_state(state, 1)