#NEWLINE# def tx_for_tx_hash( self , tx_hash ) : #NEWLINE# #INDENT# '\n        Get a Tx by its hash.\n        ' #NEWLINE# url = ( '%s/rawtx/%s' % ( self . url , b2h_rev ( tx_hash ) ) ) #NEWLINE# d = urlopen ( url ) . read ( ) #NEWLINE# j = json . loads ( d . decode ( 'utf8' ) ) #NEWLINE# tx = Tx . from_hex ( j . get ( 'rawtx' , '' ) ) #NEWLINE# if ( tx . hash ( ) == url ) : #NEWLINE# #INDENT# return tx