Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
On Sun, Feb 24, 2019 at 4:40 PM Cameron Simpson wrote: > I've modified your script. Please try the script appended below. The > short answer is that resizeterm() is _not_ normally useful to you, the > programmer; it will only be useful if curses does not get to notice > terminal size changes - _t

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Mats Wichmann
All is is_term_resized, resizeterm and the "internal" resize_term functions are recent additions :-) From "man 3 resizeterm":  This extension of ncurses was introduced in mid-1995.  It  was  adopted in NetBSD curses (2001) and PDCurses (2003). For some definition of "recent" :) I have an

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Cameron Simpson
On 24Feb2019 17:48, boB Stepp wrote: On Sun, Feb 24, 2019 at 2:52 PM Mats Wichmann wrote: If it's snippets you want, I always look at programcreek. These are always part of something bigger so they may not fit your request to have them be something you can run. https://www.programcreek.com/p

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
On Sun, Feb 24, 2019 at 2:52 PM Mats Wichmann wrote: > > On 2/24/19 1:30 PM, boB Stepp wrote: > > > So what am I misunderstanding? Can someone show me a code snippet > > that I can run which will demonstrate the usefulness and usage of > > curses.resizeterm()? > > > > TIA! > > > > If it's snippet

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
On Sun, Feb 24, 2019 at 4:40 PM Cameron Simpson wrote: > > On 24Feb2019 14:30, boB Stepp wrote: > >What you say makes sense and supports much of what I had concluded > >from my coding experiments. However, I still cannot get the function > >call, curses.resizeterm(), to do anything meaningful,

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Cameron Simpson
On 24Feb2019 22:51, Mark Lawrence wrote: As I know squat about the curses module is this a time when a bug report could be put into the docs to clarify things, or do you have to know something about curses before you try using the Python wrapper? Well, both. The Python curses module is mostl

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Mark Lawrence
On 24/02/2019 22:39, Cameron Simpson wrote: On 24Feb2019 14:30, boB Stepp wrote: On Sun, Feb 24, 2019 at 1:39 AM Cameron Simpson wrote: It looks like the resizeterm() function updates the curses _internal_ records of what it believes the physcial terminal size to be.  When you physically resi

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Cameron Simpson
On 24Feb2019 14:30, boB Stepp wrote: On Sun, Feb 24, 2019 at 1:39 AM Cameron Simpson wrote: It looks like the resizeterm() function updates the curses _internal_ records of what it believes the physcial terminal size to be. When you physically resize a terminal the processes within it receive

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Mats Wichmann
On 2/24/19 1:30 PM, boB Stepp wrote: So what am I misunderstanding? Can someone show me a code snippet that I can run which will demonstrate the usefulness and usage of curses.resizeterm()? TIA! If it's snippets you want, I always look at programcreek. These are always part of something b

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
On Sun, Feb 24, 2019 at 1:39 AM Cameron Simpson wrote: > It looks like the resizeterm() function updates the curses _internal_ > records of what it believes the physcial terminal size to be. When you > physically resize a terminal the processes within it receive a SIGWINCH > signal, and those wh

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Alan Gauld via Tutor
On 24/02/2019 05:00, boB Stepp wrote: > curses.resizeterm(nlines, ncols)¶ > > Resize the standard and current windows to the specified dimensions, > and adjusts other bookkeeping data used by the curses library that > record the window dimensions (in particular the SIGWINCH handler). > > > Afte