#NEWLINE# def new_qt_console( self , evt = None ) : #NEWLINE# #INDENT# 'start a new qtconsole connected to our kernel' #NEWLINE# try : #NEWLINE# #INDENT# if hasattr ( self . ipkernel , 'profile' ) : #NEWLINE# #INDENT# return connect_qtconsole ( self . ipkernel . connection_file , profile = self . ipkernel . profile ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return connect_qtconsole ( evt . ipkernel . connection_file ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# if self . logger : #NEWLINE# #INDENT# self . logger . error ( ( "Couldn't start QT Console: %s" % str ( e ) ) )