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
|
self.stopping = True
|
||||||
|
|
||||||
def prompt(self):
|
def prompt(self):
|
||||||
return '> '
|
return '> hh'
|
||||||
|
|
||||||
def handle_not_found(self, c, args):
|
def handle_not_found(self, c, args):
|
||||||
print(f'command not found; {c}')
|
print(f'command not found; {c}')
|
||||||
|
15
commander.py
15
commander.py
@ -4,20 +4,13 @@ import argparse
|
|||||||
from store import Store
|
from store import Store
|
||||||
import importlib
|
import importlib
|
||||||
import sys
|
import sys
|
||||||
|
from command_line import CommandLine
|
||||||
|
|
||||||
class Commander(CommandLine):
|
class Commander(CommandLine):
|
||||||
pass
|
def do_foo(self):
|
||||||
|
|
||||||
|
|
||||||
store_file = 'data/store.db'
|
store_file = 'data/store.db'
|
||||||
s = Store(store_file)
|
s = Store(store_file)
|
||||||
|
s.foo()
|
||||||
|
|
||||||
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