From 4d3bc68c677cc9554df9c47dd214dfc4cb9c6577 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Fri, 16 Jun 2017 16:19:56 +0200 Subject: [PATCH] OCD cosmetics. --- cnn-svrt.py | 3 +++ 1 file changed, 3 insertions(+) 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() -- 2.20.1