#NEWLINE# def _get_rpc_conf( self ) : #NEWLINE# #INDENT# settings = { #NEWLINE# #INDENT# 'username' : 'rpcuser' , #NEWLINE# 'password' : 'rpcpassword' , #NEWLINE# 'rpc_port' : 8332 , #NEWLINE# #UNINDENT# } #NEWLINE# if os . path . exists ( self . wallet_conf ) : #NEWLINE# #INDENT# conf = open ( self . wallet_conf ) #NEWLINE# for l in conf : #NEWLINE# #INDENT# if l . startswith ( 'rpcuser=' ) : #NEWLINE# #INDENT# settings [ 'username' ] = l [ 8 : ] . rstrip ( '\n' ) #NEWLINE# #UNINDENT# if l . startswith ( 'rpcpassword=' ) : #NEWLINE# #INDENT# settings [ 'password' ] = l [ 12 : ] . rstrip ( '\n' ) #NEWLINE# #UNINDENT# if l . startswith ( 'rpcport=' ) : #NEWLINE# #INDENT# settings [ 'rpc_port' ] = int ( l [ 8 : ] . rstrip ( '\n' ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return settings