示例#1
0
 def __init__(self, parent_app, command_manager, stdin, stdout):
     InteractiveApp.__init__(
         self,
         parent_app=parent_app,
         command_manager=command_manager,
         stdin=stdin,
         stdout=stdout
     )
示例#2
0
 def make_interactive_app(self, errexit, *command_names):
     fake_command_manager = [(x, None) for x in command_names]
     return InteractiveApp(FakeApp,
                           fake_command_manager,
                           stdin=None,
                           stdout=None,
                           errexit=errexit)
示例#3
0
 def completenames(self, text, *ignored):
     return InteractiveApp.completenames(self, text) + [n for n in self.command_manager.commands.keys() if n.startswith(text)]
示例#4
0
 def _interactive_factory(self, *args, **kwargs):
     # create a interactiveapp but adjust it
     from cliff.interactive import InteractiveApp
     rv = InteractiveApp(*args, **kwargs)
     rv.prompt = utils.get_prompt(self.pwd)
     return rv
示例#5
0
 def _interactive_factory(self, *args, **kwargs):
     # create a interactiveapp but adjust it
     from cliff.interactive import InteractiveApp
     rv = InteractiveApp(*args, **kwargs)
     rv.prompt = utils.get_prompt(self.pwd)
     return rv