Skip to content

Consider making output as wide as the terminal #3

Open
@yarikoptic

Description

@yarikoptic

Possibly making it optional... I would have added --width=auto and did max terminal width if that information is available ... here is code from tqdm

tqdm/_utils.py-def _environ_cols_linux(fp):  # pragma: no cover
tqdm/_utils.py-
tqdm/_utils.py-    try:
tqdm/_utils.py:        from termios import TIOCGWINSZ
tqdm/_utils.py-        from fcntl import ioctl
tqdm/_utils.py-        from array import array
tqdm/_utils.py-    except ImportError:
tqdm/_utils.py-        return None
tqdm/_utils.py-    else:
tqdm/_utils.py-        try:
tqdm/_utils.py:            return array('h', ioctl(fp, TIOCGWINSZ, '\0' * 8))[1]
tqdm/_utils.py-        except:
tqdm/_utils.py-            try:
tqdm/_utils.py-                from os.environ import get
tqdm/_utils.py-            except ImportError:
tqdm/_utils.py-                return None
tqdm/_utils.py-            else:
tqdm/_utils.py-                return int(get('COLUMNS', 1)) - 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions