#NEWLINE# def send_to_websocket( self , data ) : #NEWLINE# #INDENT# 'Send (data) directly to the websocket.' #NEWLINE# try : #NEWLINE# #INDENT# data = json . dumps ( self ) #NEWLINE# self . websocket . send ( data ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . rtm_connect ( reconnect = True )