From f4959783819f576d0d9b78a00d36969a86b47ed5 Mon Sep 17 00:00:00 2001 From: Jan Lerking Date: Mon, 7 May 2018 20:12:22 +0200 Subject: [PATCH] Updated h2inc_gtk.py --- Gui test/h2inc_gtk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gui test/h2inc_gtk.py b/Gui test/h2inc_gtk.py index 1aa3fc1..acad1f7 100755 --- a/Gui test/h2inc_gtk.py +++ b/Gui test/h2inc_gtk.py @@ -77,6 +77,7 @@ incinc = '' defdir = False defsrc = 'usr/include' defdest = '~' +count = 0 def sourcedir_filecnt(sourcedir): ### Return the number of files, ending with '.h', in sourcedir - including subdirectories ### @@ -112,6 +113,7 @@ def sourcedir_foldercnt(sourcedir): return cnt def process_file(data): + global count outfile = '' inputfile = data encodings = ['utf-8', 'latin-1', 'windows-1250', 'windows-1252', 'ascii', @@ -146,7 +148,8 @@ def process_file(data): fh.close() outputfile = os.path.splitext(inputfile)[0] + '.inc' outputfile = str(outputfile).replace(srcdir, destdir) - print(outputfile) + count += 1 + print(str(count)+'->'+outputfile) if not os.path.exists(os.path.dirname(outputfile)): try: os.makedirs(os.path.dirname(outputfile))