def print_env_info ( key , out = sys . stderr ) : value = os . getenv ( key ) if value is not None : print ( key , "=" , repr ( value ) , file = out )
python code to display environment variables
If given environment key is defined print it out .
def print_env_info(key, out=sys.stderr):
    """If given environment key is defined, print it out."""
    value = os.getenv(key)
    if value is not None:
        print(key, "=", repr(value), file=out)