diff --git a/Gui test/h2inc_gtk.py b/Gui test/h2inc_gtk.py index 7f1c7d2..c6bf56b 100644 --- a/Gui test/h2inc_gtk.py +++ b/Gui test/h2inc_gtk.py @@ -58,6 +58,7 @@ class Worker(): for i in range(self.filecnt): proportion = (float(i+1))/self.filecnt self.queue.put((proportion, "working...", i)) + time.sleep(0.01) process_file(filelist[i]) self.queue.put((1.0, "finished")) print("The worker has finished.") @@ -106,12 +107,6 @@ def sourcedir_foldercnt(sourcedir): # print(len(folderlist)) return cnt -def process_files(): - print(srcdir) - print(destdir) - pool = mp.Pool(processes=num_cores) - pool.map(process_file, filelist) - def process_file(data): outfile = '' inputfile = data @@ -301,13 +296,15 @@ class ExampleApp: listener.connect("updated",self.callbackDisplay) listener.connect("finished",self.callbackFinished) - print("Starting Worker") - self.process = Process(target=worker.go, args=()) - self.process.start() - print("Starting Listener") thread = threading.Thread(target=listener.go, args=()) thread.start() + print("Starting Worker") + self.process = Process(target=worker.go, args=()) + self.process.start() + + + app = ExampleApp() app.run(sys.argv)