question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider making output as wide as the terminal

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
juhakivekascommented, Jun 5, 2019

@Utkarsh1308 I appreciate your efforts 👍

0reactions
Utkarsh1308commented, Jun 26, 2019

Hey @juhakivekas Any changes you would want in my PR? I’m happy to help 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Util for trimming output to terminal width? - linux - Super User
You can use the cut command to slice the output. For example: ps aux | grep -v 'www-data' | cut -c-80. This will...
Read more >
How to set R to use all of the width of my terminal?
2? 1 · Stack screen output into columns to make use of screen width and avoid scrolling · 4 · Set environment variable...
Read more >
Displaying large output on terminal window - Stack Overflow
Just click the icon on the top left > Properties > Layout and set Screen Buffer Size to a large enough number.
Read more >
Terminal Width and "Failed to parse remote port from server ...
at this point I make the right panel wider, navigate back to the terminal, wait for it finish connecting and navigate back to...
Read more >
systemctl produces unpredictable output based on terminal ...
If I make it 104 characters wide, I get output. ... I think a better approach is to limit the amount of information...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found