Created
January 10, 2010 12:26
-
-
Save bebraw/273469 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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