Debian Bug report logs - #257472
python2.3: getmaxyx() breaks when the window shrinks

Package: python2.4; Maintainer for python2.4 is Matthias Klose <doko@debian.org>; Source for python2.4 is src:python2.4.

Reported by: Chris Share <debian@caesium.me.uk>

Date: Sat, 3 Jul 2004 18:33:01 UTC

Severity: normal

Tags: upstream

Forwarded to http://bugs.python.org/issue984870

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#257472; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to Chris Share <debian@caesium.me.uk>:
New Bug report received and forwarded. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Chris Share <debian@caesium.me.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python2.3: getmaxyx() breaks when the window shrinks
Date: Sat, 03 Jul 2004 19:19:40 +0100
Package: python2.3
Version: 2.3.4-3
Severity: normal


When derived windows of stdscr have been created, shrinking the terminal
produces a KEY_RESIZE event, but getmaxyx() returns the previous
terminal size. Only by increasing the window size does it return the
correct terminal dimensions.

A minimal script to show this effect is included below.

#!/usr/bin/python
import curses, sys

def init_display(stdscr):
    stdscr.clear()
    stdscr.refresh()
    size = stdscr.getmaxyx()
    sys.stderr.write("Now %u x %u\n" % (size[1],size[0]))
    rootwin = stdscr.derwin(20, 50, 0, 0)
    return rootwin

def main(stdscr):
    rootwin = init_display(stdscr)
    while 1:
        input = rootwin.getch()
        if ( input == curses.KEY_RESIZE):
            init_display(stdscr)
        elif input == ord("q"):
            sys.exit()
        rootwin.refresh()

curses.wrapper(main)


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-galadriel1
Locale: LANG=C, LC_CTYPE=C

Versions of packages python2.3 depends on:
ii  libbz2-1.0                  1.0.2-1      A high-quality block-sorting file 
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  libdb4.2                    4.2.52-16    Berkeley v4.2 Database Libraries [
ii  libncurses5                 5.4-4        Shared libraries for terminal hand
ii  libreadline4                4.3-10       GNU readline and history libraries
ii  libssl0.9.7                 0.9.7d-3     SSL shared libraries
ii  zlib1g                      1:1.2.1.1-3  compression library - runtime

-- no debconf information



Noted your statement that Bug has been forwarded to http://python.org/sf/984870. Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: upstream Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `python2.3' to `python2.4'. Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. Full text and rfc822 format available.

Forwarded-to-address changed from http://python.org/sf/984870 to http://bugs.python.org/issue984870. Request was from Sandro Tosi <morph@debian.org> to control@bugs.debian.org. (Thu, 18 Jun 2009 15:00:05 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Feb 9 19:29:10 2010; Machine Name: busoni.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.