source_panel.py 文件源码

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

项目:CAAPR 作者: Stargrazer82301 项目源码 文件源码
def run(self):
        latest_mtime = 0.0
        while self.keep_running:
            filename_to_open = None
            possible_matches = glob.glob(self.source_panel.autoload_match_string)
            if len(possible_matches) > 0:
                for cur_match in possible_matches:
                    cur_match_mtime = os.path.getmtime(cur_match)
                    if cur_match_mtime > latest_mtime:
                        filename_to_open = cur_match
                        latest_mtime = cur_match_mtime
                if filename_to_open is not None:
                    wx.CallAfter(pub.sendMessage, 'load-fits-file', msg=filename_to_open)
            time.sleep(self.source_panel.autoload_pausetime)
            if self.source_panel.autoload_mode != 'file-match':
                self.keep_running = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号