[Bug 389148] New: python-curses: new window aren't displayed if stdscr. getch() is called right after their creation
https://bugzilla.novell.com/show_bug.cgi?id=389148 Summary: python-curses: new window aren't displayed if stdscr.getch() is called right after their creation Product: openSUSE 10.3 Version: Final Platform: 64bit OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: dido@quipo.it QAContact: qa@suse.de Found By: --- Created an attachment (id=214222) --> (https://bugzilla.novell.com/attachment.cgi?id=214222) Example with one window I'm developing a Python script that uses the curses package; I'm reporting a strange case that doesn't make much sense to me. My script: 1- creates a new window using curses.newwin() 2- inserts a string into it using curses.addstr() 3- refreshes the window 4- calls the getch() method. The window is not shown if in step 4 I'm calling the getch() method of the "stdscr" object that Python gives me. The window is only shown if I call _its_ getch() method. This is not what I expected after reading the python.curses documentation in /usr/share/doc/packages/python/html/lib/curses-window-objects.html: I understood that the refresh() method of any window should trigger its update on screen immediately. The script is very simple, and is attached to this report. A comment explains how to trigger this behavior. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=389148
Arrigo Marchiori
https://bugzilla.novell.com/show_bug.cgi?id=389148
User dido@quipo.it added comment
https://bugzilla.novell.com/show_bug.cgi?id=389148#c1
--- Comment #1 from Arrigo Marchiori
https://bugzilla.novell.com/show_bug.cgi?id=389148
User dido@quipo.it added comment
https://bugzilla.novell.com/show_bug.cgi?id=389148#c2
--- Comment #2 from Arrigo Marchiori
https://bugzilla.novell.com/show_bug.cgi?id=389148
Philipp Thomas
https://bugzilla.novell.com/show_bug.cgi?id=389148
Jan Matejek
If the window is not a pad, and it has been moved or modified since the last call to wrefresh, wrefresh will be called before another character is read. (this is not mentioned in python curses manual, but in the manual of ncurses
https://bugzilla.novell.com/show_bug.cgi?id=389148
User jmatejek@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=389148#c3
Jan Matejek
1- creates a new window using curses.newwin() 2- inserts a string into it using curses.addstr() 3- refreshes the window
3.5 - refreshes stdscr, covering the new window 4- calls the getch() method.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=389148
User ardovm@yahoo.it added comment
https://bugzilla.novell.com/show_bug.cgi?id=389148#c4
--- Comment #4 from Arrigo Marchiori
This is correct behavior. What happens is that your windows -are- put on screen immediately, but removed right afterwards by refreshing stdscr.
I see. Thank you for your thorough explanation. I'm sorry for this wrong bug report. I hope I didn't make you lose too much time. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com