class StatsCruncherApp(App): def __init__(self, player, group, lines, **kwargs): super(StatsCruncherApp, self).__init__(**kwargs) self.group = group self.lines = lines self.parser = Parse_Line() self.info_pane = InfoForm(self.group) def update(self, dt): line = self.lines.readline() if line != "": self.parser.parse(line.split(" "), self.group) self.info_pane.update_stats(self.group) def build(self): self.root.add_widget(self.info_pane) Clock.schedule_interval(self.update, .1 / 60.0) self.info_pane.add_member(self.group.player)
def __init__(self, player, group, lines, **kwargs): super(StatsCruncherApp, self).__init__(**kwargs) self.group = group self.lines = lines self.parser = Parse_Line() self.info_pane = InfoForm(self.group)