#NEWLINE# @ rumps . clicked ( 'View balance' ) #NEWLINE# def disp_balance( self ) : #NEWLINE# #INDENT# daemon = xmlrpclib . ServerProxy ( 'http://localhost:7080/' ) #NEWLINE# try : #NEWLINE# #INDENT# balance = daemon . get_balance ( ) #NEWLINE# r = round ( float ( balance ) , 2 ) #NEWLINE# try : #NEWLINE# #INDENT# rumps . notification ( title = 'LBRY' , subtitle = '' , message = str ( ( 'Your balance is %.2f LBC' % r ) ) , sound = False ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# rumps . alert ( title = 'LBRY' , message = str ( ( 'Your balance is %.2f LBC' % r ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# rumps . notification ( title = 'LBRY' , subtitle = '' , message = "Couldn't connect to lbrynet daemon" , sound = True ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# rumps . alert ( title = 'LBRY' , message = "Couldn't connect to lbrynet daemon" )