Guido sees the light: PEP 8 updated

Tim Chase python.list at tim.thechases.com
Sun Apr 17 14:11:56 EDT 2016


On 2016-04-17 16:35, Coos Haak wrote:
> Op Sat, 16 Apr 2016 20:30:52 -0500 schreef Tim Chase:
> >> Try `mode con cols=120 lines=30`.
> > 
> > Yeah, that will do it, as will going into the settings and
> > changing it. But basically every other program on Windows, and
> > every console on Linux/BSD/Mac will let me resize a terminal
> > running while another program is running.  For a cmd.exe window,
> > I have to quit, issue the `mode` command, restart my application,
> > and return to where I was.
> 
> No need to close. Right-click on statusbar and set properties.

By "close", I meant "close the application running within the cmd.exe
window" rather than "close the cmd.exe window".

In most *nix programs, they understand the SIGWINCH (window-size
changed) signal and respond accordingly.  In the Win32 world, it was
pretty fixed in size, so most terminal programs don't readily
accommodate changed size while they're running.  So as Eryk Sun
mentions, the program has to jump through hoops to run "mode" in a
subprocess to change the terminal size, or use
GetConsoleScreenBufferInfoEx/SetConsoleScreenBufferInfoEx or other
such mechanisms.

It's not that it *can't* be done, it's just done in an *inconvenient*
way (if done at all).

-tkc






More information about the Python-list mailing list