tkgui.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:MACE-AL 作者: julmaxi 项目源码 文件源码
def request_next_annotation(self, *arg):
        value = self.user_tag_value.get()

        if value == "":
            self.root.bell()
            return

        if value not in self.annotation_state.parser_predictions.value_set:
            res = tkMessageBox.askokcancel(
                "New Tag",
                "You are about to introduce the new tag '{}'. Proceed?".format(value))
            if res is False:
                return
            else:
                self.combobox.configure(values=sorted(
                    list(self.annotation_state.parser_predictions.value_set) + [value]))

        self.annotation_state.process_annotation(self.current_request, value)

        comment_value = self.comment_box.get("1.0", END).strip()
        if len(comment_value) > 0:
            self.write_comment(self.current_request.token,
                               comment_value, value)
            self.comment_box.delete("1.0", END)

        if self.autosave:
            self.save_state()

        self.get_next_request()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号