games_nebula.py 文件源码

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

项目:games_nebula 作者: yancharkin 项目源码 文件源码
def cb_button_get_scripts(self, button):

        lib = button.get_name()

        if lib == 'goglib':
            overwrite = self.checkbutton_goglib_scripts.get_active()
        elif lib == 'mylib':
            overwrite = self.checkbutton_mylib_scripts.get_active()

        self.main_window.hide()
        if len(self.additional_windows_list) != 0:
            for window in self.additional_windows_list:
                window.hide()

        while Gtk.events_pending():
            Gtk.main_iteration()

        mylib_has_new_scripts = os.system('python2 ' + nebula_dir + '/get_scripts.py ' + lib + ' ' + str(overwrite))

        # Ugly but works
        if mylib_has_new_scripts == 0:
            print("No new scripts.")
        else:
            print("New scripts downloaded!")
            os.execl(sys.executable, 'python2', __file__)

        self.main_window.show()
        if len(self.additional_windows_list) != 0:
            for window in self.additional_windows_list:
                window.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号