#NEWLINE# def send_command( self , * args , **kwargs ) : #NEWLINE# #INDENT# cmd0 = GafferCommand ( * args , ** kwargs ) #NEWLINE# cmd = self . commands [ cmd . identity ] = cmd0 #NEWLINE# data = { #NEWLINE# #INDENT# 'identity' : cmd . identity , #NEWLINE# 'name' : cmd . name , #NEWLINE# 'args' : cmd . args , #NEWLINE# 'kwargs' : cmd . kwargs , #NEWLINE# #UNINDENT# } #NEWLINE# msg = { #NEWLINE# #INDENT# 'event' : 'CMD' , #NEWLINE# 'data' : data , #NEWLINE# #UNINDENT# } #NEWLINE# self . write_message ( json . dumps ( msg ) ) #NEWLINE# return cmd