-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
termsize curses version does not work for me #20
Comments
I noticed something similar with I also discovered that it appears to be necessary to call |
Sorry, I haven't been able to reproduce this, so I'm not sure what's going on. It still works for me on Debian sid in urxvt, xterm and the console, and when sshed to a Raspbian raspberry pi from urxvt and the console. get_terminal_size_curses() is always called first, and get_terminal_size_noncurses will only be called if the curses version fails. It might help to see the actual error message. People seeing failures: what is TERM set to? I've tried it with TERM=rxvt-unicode-256color, TERM=xterm and TERM=linux. |
Here is my setup:
With your stock script, I had to patch the shebang line because I only have Once that was done, with the default Using Commenting out the
Note the scrollbar on that code block. In both cases, the first line of output has a ton of whitespace before it. In fact, it appears to consistently be one less than the length needed to make it wrap, so it appears to be Adding a |
for me I have tried WezTerm and stock Terminal on on OSX, as well as gnome-terminal on Ubuntu and they all do the same thing, getmaxyx() always returns whatever the terminal is set to (i.e. the output of stty -a), which is by default 24,80. I think thats why it works after using the noncurses version as noncurses sets it to correct values. TERM is set to vt220, but tried linux, rxvt-unicode-256color, screen, no difference on the host system python is 3.9.2, debian 11 if it makes a difference |
latest version does not work for me, tried both debian 11.3 and RHEL 8.6, serial console
for some reason getmaxyx() always returns 80x25
if it is working for you maybe rewrite it so if you get 80x25 from getmaxyx() fall back to non curses version as if someone had 80x25 terminal, he wouldn't be using termsize in the first place ;)
The text was updated successfully, but these errors were encountered: