Exemplo n.º 1
0
 def add_ipython_subwindow(self):
     try:
         create_ipython_console(self, 'iPython console', 800, 600)
     except MultipleInstanceError:
         logging.debug("Unable to open iPython console. "
                       "MultipleInstanceError")
     except Exception as inst:
         print(type(inst))    # the exception instance
         print(inst.args)     # arguments stored in .args
         print(inst)          # __str__ allows args to be printed directly,
         pass                 # but may be overridden in exception subclasses
Exemplo n.º 2
0
 def add_ipython_subwindow(self, opt_model):
     try:
         title_bar = 'iPython console: '
         if opt_model is not None:
             title_bar = title_bar + opt_model.name()
         create_ipython_console(self, opt_model, title_bar, 800, 600)
     except MultipleInstanceError:
         logging.debug("Unable to open iPython console. "
                       "MultipleInstanceError")
     except Exception as inst:
         print(type(inst))  # the exception instance
         print(inst.args)  # arguments stored in .args
         print(inst)  # __str__ allows args to be printed directly,
         pass  # but may be overridden in exception subclasses