From 152c69c7546d2774dc0db4f8973a8a210682cdfb Mon Sep 17 00:00:00 2001 From: Otto Kohulak Date: Thu, 20 Oct 2022 15:53:38 +0200 Subject: [PATCH] Draft: I need to setup my params differently. This is one idea but it requires extra import --- src/irpf90_indent.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/irpf90_indent.py b/src/irpf90_indent.py index fe98a63..2959a47 100755 --- a/src/irpf90_indent.py +++ b/src/irpf90_indent.py @@ -26,10 +26,21 @@ import sys +import os import re LENMAX = 70 tabn = 2 + +#copy of locals without "import copy" +locals_ = {x: y for x, y in locals().items()} +for key, value in locals_.items(): + try: + val = os.environ["IRPF90_INDENT_"+key.upper()] + locals()[key] = type(locals_[key])(val) + except: + pass + tab = " "*tabn class Grep(object):