(f,*args)
return f_with_update
conditionally monitor subchannel
conditionally monitor subchannel
conditionally monitor subchannel
def with_subchannel(f,*args):
    "conditionally monitor subchannel"
    def f_with_update(*args):
        try:
            f(*args)
            if monitor_subchannel:
                update_subchannel_msgs(force=True)
        except AttributeError: #if kc is None
            echo("not connected to IPython", 'Error')
    return f_with_update
def with_subchannel ( f , * args ) : def f_with_update ( * args ) : try : f ( * args ) if monitor_subchannel : update_subchannel_msgs ( force = True ) except AttributeError : #if kc is None echo ( "not connected to IPython" , 'Error' ) return f_with_update