def in_ipython_frontend():
 try:
  ip = get_ipython()
  return ('zmq' in str(type(ip)).lower())
 except:
  pass
 return False

def in_ipython_frontend ( ) : try : ip = get_ipython ( ) return ( 'zmq' in str ( type ( ip ) ) . lower ( ) ) except : pass return False
check if were inside an an ipython zmq frontend .