Author poq
Recipients BreamoreBoy, akuchling, pbazant, poq, r.david.murray
Date 2012-05-17.21:51:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337291498.92.0.0356226481381.issue2675@psf.upfronthosting.co.za>
In-reply-to
Content
Just to confirm: curses SIGWINCH handling is still (2.7/3.2) broken after importing readline.

Readline seems to set the LINES/COLUMNS environment vars, and this confuses curses, even if curses is imported after readline.

Clearing the LINES/COLUMNS vars after import readline fixes the issue:
os.environ['LINES'] = os.environ['COLUMNS'] = ''
or
os.unsetenv('LINES'); os.unsetenv('COLUMNS')
(or other variations).

I spent a couple hours tearing my hair out over this, before I found this report.

It may be possible for Python to work around this readline behavior by saving LINES/COLUMNS and restoring them after initializing readline.

Or maybe this should just be documented somewhere.
History
Date User Action Args
2012-05-17 21:51:38poqsetrecipients: + poq, akuchling, pbazant, r.david.murray, BreamoreBoy
2012-05-17 21:51:38poqsetmessageid: <1337291498.92.0.0356226481381.issue2675@psf.upfronthosting.co.za>
2012-05-17 21:51:38poqlinkissue2675 messages
2012-05-17 21:51:38poqcreate