curses in Python 2.0?

Alex not_such_a_brain_after_all at mit.edu
Sun Nov 5 21:02:32 EST 2000


>   File "/usr/local/bin/cplay", line 197, in newwin
>     return curses.newwin(1, self.parent.cols, self.parent.rows-2, 0)
> error: curses function returned NULL

Perhaps the size of the window you're requesting is inappropriate;
either too big, or negative.  That is the only time I've seen this
error, that I recall.

> >>> import curses
> >>> curses.initscr()
> 
> at which point the screen blanks and I get
> 
> <curses window object at 0x818b4d8>
> 				     >>> 
> 
> where all import is ignored except keyboard interrupts (which is in
> contrast to doing the same thing with Python 1.5.2, where curses mode
> is obviously interfering with the Python interpreter, but you can
> still issue commands).

I didn't start playing with curses until after I moved to 2.0, but I
started with Andrew Kuchling's HOWTO on curses.  It gives a framework
for debugging curses programs that I find very convenient.

http://python.org/doc/howto/curses/curses.html

HTH.
Alex.

-- 
Speak softly but carry a big carrot.




More information about the Python-list mailing list