diff --git a/__pycache__/h2inc.cpython-35.pyc b/__pycache__/h2inc.cpython-35.pyc index df2ba25..d2358b3 100644 Binary files a/__pycache__/h2inc.cpython-35.pyc and b/__pycache__/h2inc.cpython-35.pyc differ diff --git a/__pycache__/h2inc_gui.cpython-35.pyc b/__pycache__/h2inc_gui.cpython-35.pyc index ddb1a91..fc9fd73 100644 Binary files a/__pycache__/h2inc_gui.cpython-35.pyc and b/__pycache__/h2inc_gui.cpython-35.pyc differ diff --git a/__pycache__/h2inc_parser.cpython-35.pyc b/__pycache__/h2inc_parser.cpython-35.pyc index cc5137d..076292d 100644 Binary files a/__pycache__/h2inc_parser.cpython-35.pyc and b/__pycache__/h2inc_parser.cpython-35.pyc differ diff --git a/h2inc.py b/h2inc.py index 62fca37..2309a52 100644 --- a/h2inc.py +++ b/h2inc.py @@ -13,22 +13,26 @@ import h2inc_gui tupline = [] preproc = () outfile = '' -folders = [] +filelist = [] +folderlist = [] cnt = 0 def sourcedir_filecnt(sourcedir): ### Return the number of files, ending with '.h', in sourcedir - including subdirectories ### cnt = 0 + global filelist for folderName, subfolders, files in os.walk(sourcedir): for file in files: if file.lower().endswith('.h'): - cnt = cnt+1 + cnt += 1 + filelist += [file] + print(filelist) return cnt def sourcedir_foldercnt(sourcedir): ### Return the number of folders, if it contains '*.h' files, in sourcedir - including subdirectories ### global cnt - global folders + global folderlist for folderName, subfolders, files in os.walk(sourcedir): if subfolders: for subfolder in subfolders: @@ -37,8 +41,8 @@ def sourcedir_foldercnt(sourcedir): if tempf: cnt = cnt+1 print(folderName) - folders += [folderName] - print(folders) + folderlist += [folderName] + print(folderlist) return cnt def process_files(sourcedir, destdir):