Update command_line.py, commander.py and one other file

This commit is contained in:
Richard Bronkhorst 2023-06-08 18:49:00 +02:00
parent b123410d43
commit e0758a7817
3 changed files with 10 additions and 15 deletions

View File

@ -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}')

View File

@ -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()

View File

@ -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')