From 35e8d57c9a062d9e56473773c01e0243707e5253 Mon Sep 17 00:00:00 2001 From: Jan Lerking Date: Thu, 15 Feb 2018 18:31:20 +0100 Subject: [PATCH] Updated for linux test --- multiprocessing_test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/multiprocessing_test.py b/multiprocessing_test.py index 59f1e1a..2fb07fc 100644 --- a/multiprocessing_test.py +++ b/multiprocessing_test.py @@ -25,14 +25,12 @@ def sourcedir_filecnt(sourcedir): if file.lower().endswith('.h'): cnt += 1 filelist += [folderName+'/'+file] - print(folderName+'/'+file) - #print(filelist) return cnt def process_files(sourcedir, destdir): global filelist - outfile = '' for f in filelist: + outfile = '' inputfile = f encodings = ['utf-8', 'latin-1', 'windows-1250', 'windows-1252', 'ascii', 'big5', 'big5hkscs', 'cp037', 'cp273', 'cp424', 'cp437', 'cp500', @@ -62,7 +60,6 @@ def process_files(sourcedir, destdir): break print(os.path.basename(f)) for lines in fh: - print(lines) outfile = outfile+lines fh.close() outputfile = os.path.splitext(inputfile)[0]+'.inc' @@ -80,11 +77,14 @@ def process_files(sourcedir, destdir): def single_thread(): t1 = time.time() - sourcedir_filecnt(sourcedir) + cnt = sourcedir_filecnt(sourcedir) + print('Files in: '+str(cnt)) process_files(sourcedir, destdir) print('Single thread process time: '+str(time.time()-t1)) -sourcedir = 'C:/Users/dksojlg/Documents/gtk+-3.22.26' -destdir = 'C:/Users/dksojlg/Documents/include' +#sourcedir = 'C:/Users/dksojlg/Documents/gtk+-3.22.26' +sourcedir = '/usr/include' +#destdir = 'C:/Users/dksojlg/Documents/include' +destdir = '/data_2/include' single_thread() \ No newline at end of file