def start_copying(zip_list): global copy_process copy_process = multiprocessing.Process( target=do_copy, args=(zip_list, currently_done), ) copy_process.daemon = True print(copy_process) print('Starting background process!') copy_process.start() TK_ROOT.after(UPDATE_INTERVAL, update)
def enter_handler(e): """Schedule showing the tooltip.""" nonlocal event_id if targ_widget.tooltip_text: if hasattr(targ_widget, 'instate'): if not targ_widget.instate(('!disabled', )): return event_id = TK_ROOT.after( delay, after_complete, )
def enter_handler(e): """Schedule showing the tooltip.""" nonlocal event_id if targ_widget.tooltip_text: if hasattr(targ_widget, 'instate'): if not targ_widget.instate(('!disabled',)): return event_id = TK_ROOT.after( delay, after_complete, )
def update(): """Check the progress of the copying until it's done. """ progress_var.set( 1000 * currently_done.value / res_count, ) export_btn_text.set( 'Extracting Resources ({!s}/{!s})...'.format( currently_done.value, res_count, ) ) if not copy_process.is_alive(): # We've finished copying export_btn_text.set( 'Export...' ) done_callback() else: # Coninuously tell TK to re-run this, so we update # without deadlocking the CPU TK_ROOT.after(UPDATE_INTERVAL, update)