Ejemplo n.º 1
0
    def save_patience(self):
        """Speichert gezielt das benutzte Subthema."""
        self.korpus = [item for sublist in self.patience for item in sublist]

        fname = "data/" + self.topic + ".korp"
        rawread = GL.readfile(fname)
        korpus = GL.loads(rawread)

        for ele in korpus:
            if ele["subset"]["name"] == self.subtopic:
                ele["subset"]["data"] = self.korpus

        GL.savefile(fname, korpus)
Ejemplo n.º 2
0
    def save_patience(self):
        """Speichert gezielt das benutzte Subthema."""
        self.korpus = [item for sublist in self.patience for item in sublist]

        fname = "data/" + self.topic + ".korp"
        rawread = GL.readfile(fname)
        korpus = GL.loads(rawread)

        for ele in korpus:
            if ele["subset"]["name"] == self.subtopic:
                ele["subset"]["data"] = self.korpus

        GL.savefile(fname, korpus)
Ejemplo n.º 3
0
        def update_subset(self, *args):
            """Befüllt das Subset-Dropdown, abhängig vom gewählten Thema."""
            opmenu_subset["menu"].delete(0, "end")
            fname = "data/" + opt_theme.get() + ".korp"
            rawread = GL.readfile(fname)
            korpus = GL.loads(rawread)
            new_subset = []
            for i in korpus:
                new_subset.append(i["subset"]["name"])

            for choice in new_subset:
                opmenu_subset["menu"].add_cascade(label=choice,
                                                  command=GL._setit(opt_subset, choice))