#NEWLINE# def _communicate( self , method , message_dict ) : #NEWLINE# #INDENT# path = ( self . _conduit_uri + method ) #NEWLINE# params = json . dumps ( message_dict ) #NEWLINE# body = urllib . urlencode ( { #NEWLINE# #INDENT# 'params' : params , #NEWLINE# 'output' : 'json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( self . _https_proxy or self . _http_proxy ) : #NEWLINE# #INDENT# proxy = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if self . _https_proxy : #NEWLINE# #INDENT# proxy [ 'https' ] = self . _https_proxy #NEWLINE# #UNINDENT# if proxy_handler . _http_proxy : #NEWLINE# #INDENT# proxy [ 'http' ] = self . _http_proxy #NEWLINE# #UNINDENT# proxy_handler = urllib2 . ProxyHandler ( proxy ) #NEWLINE# opener = urllib2 . build_opener ( proxy_handler ) #NEWLINE# data = opener . open ( path , body , _URLLIB_TIMEOUT ) . read ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data = urllib2 . urlopen ( path , body , _URLLIB_TIMEOUT ) . read ( ) #NEWLINE# #UNINDENT# return json . loads ( data )