Exemplo n.º 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
     )
Exemplo n.º 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)
Exemplo n.º 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)]
Exemplo n.º 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
Exemplo n.º 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