#NEWLINE# def addprotocol( self , protocol , **options ) : #NEWLINE# #INDENT# '\n        Enable a new protocol on the controller.\n\n        :param protocol: A registered protocol name or an instance\n                         of a protocol.\n        ' #NEWLINE# if isinstance ( protocol , str ) : #NEWLINE# #INDENT# protocol = getprotocol ( protocol , ** options ) #NEWLINE# #UNINDENT# self . protocols . append ( protocol ) #NEWLINE# protocol . root = weakref . proxy ( options )