INNER CODE UNIT · Python

get_env

pydna-group/pydna · src/pydna/__init__.py:187

def get_env():
    """Print a an ascii table containing all environmental variables.

    Pydna related variables have names that starts with `pydna_`
    """
    _table = PrettyTable(["Variable", "Value"])
    # _table.set_style(_prettytable.DEFAULT)
    _table.align["Variable"] = "l"  # Left align
    _table.align["Value"] = "l"  # Left align
    _table.padding_width = 1  # One space between column edges and contents
    for k, v in sorted(os.environ.items()):
        if k.lower().startswith("pydna"):
            _table.add_row([k, v])
    return _table


def logo():
    """Ascii-art logotype of pydna."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…