weather_gui.py 文件源码

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

项目:Weather-App 作者: Tomasz-Kluczkowski 项目源码 文件源码
def begin_get_report(self):
        """Begin getting data for the weather report to display it on 
        the main_canvas.
        The call goes to the Controller first. Then to the Model.

        Returns:
            None
        """
        # Do nothing if no location is entered or an active sub thread
        # is running.
        if (self.v_link["var_loc"].get() == "") \
                or (threading.active_count() > 1):
            return
        # Clear any error status message.
        self.v_link["error_message"] = ""
        self.v_link["var_status"].set("Gathering data, please wait...")
        # Request a report using a Mediating Controller in a new thread.
        report_thread = threading.Thread(target=self.controller.get_report)
        report_thread.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号