Esempio n. 1
0
File: shell.py Progetto: NIIF/indico
 def run(self, no_ipython, use_bpython, quiet):
     context = self.get_context()
     if not quiet:
         self.banner = '\n'.join(self._info + [self.banner])
     if use_bpython:
         # bpython does not support escape sequences :(
         # https://github.com/bpython/bpython/issues/396
         self.banner = strip_ansi(self.banner)
     with context['dbi'].global_connection():
         super(IndicoShell, self).run(no_ipython or use_bpython, not use_bpython)
Esempio n. 2
0
 def run(self, no_ipython, use_bpython, quiet):
     context = self.get_context()
     if not quiet:
         self.banner = '\n'.join(self._info + [self.banner])
     if use_bpython:
         # bpython does not support escape sequences :(
         # https://github.com/bpython/bpython/issues/396
         self.banner = strip_ansi(self.banner)
     with context['dbi'].global_connection():
         super(IndicoShell, self).run(no_ipython or use_bpython,
                                      not use_bpython)
Esempio n. 3
0
 def run(self, no_ipython, use_bpython, quiet):
     current_app.config['REPL'] = True  # disables e.g. memoize_request
     context = self.get_context()
     if not quiet:
         self.banner = '\n'.join(self._info + ['', self.banner])
     if use_bpython:
         # bpython does not support escape sequences :(
         # https://github.com/bpython/bpython/issues/396
         self.banner = strip_ansi(self.banner)
     clearCache()
     with context['dbi'].global_connection():
         self.run_shell(no_ipython or use_bpython, not use_bpython, quiet)