def __init__(self, parent, name='AbandonPart'): KHTMLPart.__init__(self, parent, name) self.app = get_application_pointer() self.doc = AbandoniaInfoDocument(self.app) self.handler = AbandonGamesHandler(self.app) self.begin() self.write('') self.end()
class BaseAbandoniaPart(KHTMLPart): def __init__(self, parent, name='AbandonPart'): KHTMLPart.__init__(self, parent, name) self.app = get_application_pointer() self.doc = AbandoniaInfoDocument(self.app) self.handler = AbandonGamesHandler(self.app) self.begin() self.write('') self.end() def set_game_info(self, handler): self.gameid = handler.parser.gameid self.begin() self.write('') self.end() self.app.processEvents() self.begin() self.doc.set_info(handler) self.write(self.doc.output()) self.end() print 'in set_game_info', self.gameid