def in_qtconsole():
 try:
  ip = get_ipython()
  front_end = (ip.config.get('KernelApp', {}).get('parent_appname', '') or ip.config.get('IPKernelApp', {}).get('parent_appname', ''))
  if ('qtconsole' in front_end.lower()):
   return True
 except:
  return False
 return False

def in_qtconsole ( ) : try : ip = get_ipython ( ) front_end = ( ip . config . get ( 'KernelApp' , { } ) . get ( 'parent_appname' , '' ) or ip . config . get ( 'IPKernelApp' , { } ) . get ( 'parent_appname' , '' ) ) if ( 'qtconsole' in front_end . lower ( ) ) : return True except : return False return False
check if were inside an ipython qtconsole deprecated: this is no longer needed .