From 4d4dbed2737a54ccabaa40f829c0c2a93fbe9750 Mon Sep 17 00:00:00 2001 From: Daniel Gnoutcheff Date: Wed, 29 Jun 2016 17:03:00 -0400 Subject: Progress text fixes --- suspicious | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'suspicious') diff --git a/suspicious b/suspicious index 9f6e6ea..fe09204 100755 --- a/suspicious +++ b/suspicious @@ -304,13 +304,13 @@ for file in filelist: now = datetime.datetime.now() estimate = (((now - start) / (opened + skipped)) * len(filelist)) if options.display_progress: - if len(file)> 60: + if len(file)> 50: prog_file = file.split('/')[0] + "/.../" + file.split('/')[-1] else: prog_file = file - print('\r' + " " * len(progresstext) + '\r') + print('\r' + " " * len(progresstext) + '\r', end='', file=sys.stderr) progresstext = str(((opened + skipped)*1.0/len(filelist))*100)[:5] + '% '+ " time left:" + str(estimate).split('.')[0] + ' ' + prog_file + '\r' - print(progresstext) + print(progresstext, end='', file=sys.stderr) sys.stdout.flush() filecontents = f.read() datasize += len(filecontents) @@ -322,7 +322,7 @@ for file in filelist: #Clear screen of proggress text now that finished scoring file if options.display_progress: - print('\r' + " " * len(progresstext) + '\r') + print('\r' + " " * len(progresstext) + '\r', end='') #Save summary as a file, but if the filename exists do not overwrite, append a number if options.summaryfile and len(filelist) > 0 and not options.displaysummary: -- cgit v1.2.3