diff --git a/command_line.py b/command_line.py index 75903fe..939205a 100644 --- a/command_line.py +++ b/command_line.py @@ -28,7 +28,7 @@ class CommandLine: self.stopping = True def prompt(self): - return '> ' + return '> hh' def handle_not_found(self, c, args): print(f'command not found; {c}') diff --git a/commander.py b/commander.py index 7905e94..fd942cc 100644 --- a/commander.py +++ b/commander.py @@ -4,20 +4,13 @@ import argparse from store import Store import importlib import sys +from command_line import CommandLine class Commander(CommandLine): - pass + def do_foo(self): + store_file = 'data/store.db' + s = Store(store_file) + s.foo() -store_file = 'data/store.db' -s = Store(store_file) - -if __name__ == '__main__': - while True: - importlib.reload(command_line) - from command_line import CommandLine - c = Commander() - c.run() - if c.reloading == False: - break - +Commander().run() diff --git a/store.py b/store.py index c62c307..bdd9b61 100644 --- a/store.py +++ b/store.py @@ -5,4 +5,6 @@ class Store: def __init__(self, fil): self.engine, self.session = get_session(fil) Base.metadata.create_all(self.engine) - + + def foo(self): + print('goo')