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()
评论列表
文章目录