[issue16293] curses.ungetch raises OverflowError when given -1

2016-09-17 Thread Berker Peksag
Berker Peksag added the comment: This looks like a bug in ncurses 5.7 and a duplicate of issue 15037. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> curses.unget_wch and test_curses fail when linked with ncurses 5.7 and

[issue16293] curses.ungetch raises OverflowError when given -1

2013-07-17 Thread Ankur Ankan
Changes by Ankur Ankan ankuran...@gmail.com: -- nosy: +Ankur.Ankan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16293 ___ ___ Python-bugs-list

[issue16293] curses.ungetch raises OverflowError when given -1

2013-03-19 Thread STINNER Victor
STINNER Victor added the comment: The following example returns immediatly, whereas I expected it to block. So I consider that ungetch(-1) should fail, but I may be wrong. --- import curses def test_screen(screen): screen.nodelay(True) key = screen.getch() screen.nodelay(False)

[issue16293] curses.ungetch raises OverflowError when given -1

2012-10-21 Thread STINNER Victor
STINNER Victor added the comment: Do you consider this behaviour as a bug? What is the behaviour in C? Le 21 oct. 2012 03:25, Julian Berman rep...@bugs.python.org a écrit : New submission from Julian Berman: The following code now raises an OverflowError on 3.3: import curses def

[issue16293] curses.ungetch raises OverflowError when given -1

2012-10-21 Thread Julian Berman
Julian Berman added the comment: Hi, sorry for being terse :). After checking a bit, man 3 getch says that it returns ERR (-1) in non-blocking mode if no input is available. I think you're right though -- calling ungetch without checking for the error value seems like it should be a bug in

[issue16293] curses.ungetch raises OverflowError when given -1

2012-10-20 Thread Julian Berman
New submission from Julian Berman: The following code now raises an OverflowError on 3.3: import curses def test_screen(screen): screen.nodelay(True) key = screen.getch() screen.nodelay(False) curses.ungetch(key) curses.wrapper(test_screen) or equivalently just def