#NEWLINE# def onRefreshClick( self , widget ) : #NEWLINE# #INDENT# if ( not self . steamid . get_text ( ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# files = [ f for f in listdir ( SteamApps ) if isfile ( join ( SteamApps , f ) ) ] #NEWLINE# appids = [ ] #NEWLINE# for file in files : #NEWLINE# #INDENT# m = re . search ( 'appmanifest_([0-9]+).acf' , file ) #NEWLINE# if m : #NEWLINE# #INDENT# appids . append ( int ( m . groups ( 1 ) [ 0 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# url = ( ( 'http://steamcommunity.com/id/' + self . steamid . get_text ( ) ) + '/games?tab=all&xml=1' ) #NEWLINE# html = urlopen ( url ) #NEWLINE# tree = ElementTree ( ) #NEWLINE# tree . parse ( html ) #NEWLINE# games_xml = tree . getiterator ( 'game' ) #NEWLINE# for game in games_xml : #NEWLINE# #INDENT# appid = int ( game . find ( 'appID' ) . text ) #NEWLINE# name = game . find ( 'name' ) . text #NEWLINE# exists = ( appid in appids ) #NEWLINE# self . game_liststore . append ( [ exists , appid , name ] )