Skip to content

Instantly share code, notes, and snippets.

@bebraw
Created January 10, 2010 12:26
Show Gist options
  • Save bebraw/273469 to your computer and use it in GitHub Desktop.
Save bebraw/273469 to your computer and use it in GitHub Desktop.
from file import PluginDirectory
from interpreter import Interpreter
from plugin_loader import PluginLoader
class Application:
def run(self):
plugin_loader = PluginLoader()
plugin_directory = PluginDirectory()
commands = plugin_loader.load(plugin_directory)
interpreter = Interpreter(commands)
while True:
input = self.input()
result = interpreter.interpret(input)
if result is not None:
self.output(result)
def input(self):
return raw_input('>>> ')
def output(self, result):
print result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment