Added multiprocessing testing

This commit is contained in:
2018-02-19 04:36:37 +01:00
parent 7685b8c6a8
commit e311c278e7
6 changed files with 181 additions and 8 deletions
+8 -8
View File
@@ -27,7 +27,7 @@ class h2incGUI:
self.filecnt = 0
self.infofolder = 'Number of folders: 0'
self.infofile = 'Number of headers: 0'
self.currentfile = 'Current file: '
#self.currentfile = 'Current file: '
self.totprogress = 'Total progress: '
self.sourcedir.set('Select source directory!')
self.destdir.set('Select destination directory!')
@@ -91,13 +91,13 @@ class h2incGUI:
self.progressframe.grid(row=4, rowspan=2, column=0, columnspan=3, sticky=N+S+E+W, padx=5, pady=5)
self.progressframe.grid_columnconfigure(1, weight=1)
self.cfilelabel = Label(self.progressframe, text=self.currentfile)
self.cfilelabel.grid(row=6, column=0, sticky=W, padx=5, pady=5)
self.cfilelabel.config(state=DISABLED)
#self.cfilelabel = Label(self.progressframe, text=self.currentfile)
#self.cfilelabel.grid(row=6, column=0, sticky=W, padx=5, pady=5)
#self.cfilelabel.config(state=DISABLED)
self.cfileprogress = ttk.Progressbar(self.progressframe, orient='horizontal', mode='determinate')
self.cfileprogress.grid(row=7, column=0, columnspan=3, sticky=N+S+E+W, padx=5, pady=5)
self.cfileprogress.config(variable=self.cfilevar, maximum=3)
#self.cfileprogress = ttk.Progressbar(self.progressframe, orient='horizontal', mode='determinate')
#self.cfileprogress.grid(row=7, column=0, columnspan=3, sticky=N+S+E+W, padx=5, pady=5)
#self.cfileprogress.config(variable=self.cfilevar, maximum=3)
self.totallabel = Label(self.progressframe, text=self.totprogress)
self.totallabel.grid(row=8, column=0, sticky=W, padx=5, pady=5)
@@ -154,7 +154,7 @@ class h2incGUI:
raise
destdir.set(dest)
print ('Destination directory: ', destdir.get())
process_files(source, dest)
process_files(self, source, dest)
def cfileprogress_update(cnt):
self.cfilevar = cnt