Curses module.

Jp Calderone exarkun at twistedmatrix.com
Tue Jul 15 20:01:46 EDT 2003


On Tue, Jul 15, 2003 at 07:03:33PM -0400, Alex wrote:
> Hello all,
> 
> I'm trying to learn Python, in particular the curses module. My system 
> is running Slackware 9.0 and the verion of Python that comes installed 
> with Slackware 9.0 is Python 2.2.2.
> 
> I've been trying to access the curses.wrapper module without any 
> success. I know that the wrapper exists in /usr/lib/python2.2/curses yet 
> any reference that I make to it is rebuffed by the interpreter.
> 
> Here's the python script I'm trying to run:
> 
> [snip apparently correct code]
> 
> This is the error message that I get when I try to run the script from 
> the CLI:
> 
> Traceback (most recent call last):
>   File "./curses3.py", line 15, in ?
>     curses.wrapper(newWindow())
> AttributeError: 'module' object has no attribute 'wrapper'
> 
> Any ideas as to what I could be doing wrong?
> 

  Do you, perhaps, have a file named "curses.py" in your current directory? 
If so, "import curses" will load this, and not the stdlib module.

  You could also try printing "curses.__file__" to make sure the module is
really coming from where you believe it is.

  Jp





More information about the Python-list mailing list