#NEWLINE# def run_loop( self , request_cb , notification_cb , setup_cb = None , err_cb = None ) : #NEWLINE# #INDENT# 'Run the event loop to receive requests and notifications from Nvim.\n\n        This should not be called from a plugin running in the host, which\n        already runs the loop and dispatches events to plugins.\n        ' #NEWLINE# def filter_request_cb( name , args ) : #NEWLINE# #INDENT# args = walk ( self . _from_nvim , args ) #NEWLINE# result = request_cb ( self . _from_nvim ( name ) , args ) #NEWLINE# return walk ( self . _to_nvim , result ) #NEWLINE# #UNINDENT# def filter_notification_cb( name , args ) : #NEWLINE# #INDENT# notification_cb ( self . _from_nvim ( name ) , walk ( self . _from_nvim , args ) ) #NEWLINE# #UNINDENT# if ( err_cb is None ) : #NEWLINE# #INDENT# err_cb = sys . stderr . write #NEWLINE# #UNINDENT# self . _err_cb = err_cb #NEWLINE# self . _session . run ( filter_notification_cb , filter_notification_cb , setup_cb )