From: Francois Fleuret Date: Fri, 16 Jun 2017 14:19:56 +0000 (+0200) Subject: OCD cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d3bc68c677cc9554df9c47dd214dfc4cb9c6577;p=pysvrt.git OCD cosmetics. --- diff --git a/cnn-svrt.py b/cnn-svrt.py index 592f982..90b4c6d 100755 --- a/cnn-svrt.py +++ b/cnn-svrt.py @@ -88,13 +88,16 @@ print(Fore.RED + 'Logging into ' + args.log_file + Style.RESET_ALL) def log_string(s): global pred_log_t + t = time.time() if pred_log_t is None: elapsed = 'start' else: elapsed = '+{:.02f}s'.format(t - pred_log_t) + pred_log_t = t + s = Fore.BLUE + time.ctime() + ' ' + Fore.GREEN + elapsed + Style.RESET_ALL + ' ' + s log_file.write(s + '\n') log_file.flush()