Curses: .newpad()?

Gerrit Holl gerrit.holl at pobox.com
Sat Oct 30 11:32:30 EDT 1999


Hello,

in the Curses HOWTO, the following example is given:

----- * -----
pad = curses.newpad(100, 100)
#  These loops fill the pad with letters; this is
# explained in the next section
for y in range(0, 100):
    for x in range(0, 100):
        try: pad.addch(y,x, ord('a') + (x*x+y*y) % 26 )
except curses.error: pass

#  Displays a section of the pad in the middle of the screen
pad.refresh( 0,0, 5,5, 20,75)
----- *** -----

This doesn't work, because the curses module doesn't have a function called
newpad. First, I thought I was having problems because I hadn't downloaded the
version from http://andrich.net/python/selfmade.html#ncursesmodule, but I don't
see such a function in the source from that package. What's wrong?

By the way, if I try to compile this module, I'm getting the following error:

----- *** -----
make: *** No rule to make target `/usr/lib/python1.4/config/Makefile', needed by `sedscript'.  Stop.
----- *** -----

Oh, now I'm reading the Makefile (oh, so _there_ are the installation
instructions!), do I _really_ have to recompile the whole python distribution?

regards,
Gerrit.




More information about the Python-list mailing list