Update command_line.py, commander.py and one other file
This commit is contained in:
parent
b123410d43
commit
e0758a7817
@ -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}')
|
||||
|
19
commander.py
19
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()
|
||||
|
Loading…
Reference in New Issue
Block a user