Discussion:
ImportError: No module named _curses ?
Kevin Altis
2003-01-30 03:12:25 UTC
Permalink
The curses module is not available on Windows, as you found out when you
tried to import it. The documentation should probably make that point.

http://www.python.org/doc/current/lib/module-curses.html

ka

"Ingo Linkweiler" <i.linkweiler at web.de> wrote in message
Hi,
can you explain this import error?
PythonWin 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on
win32.
import curses
File "<interactive input>", line 1, in ?
File "C:\Python22\lib\curses\__init__.py", line 15, in ?
from _curses import *
ImportError: No module named _curses
I am using Python with PythonWin (also tested all 2.2.* versions and
Active Python on different machines with Win2K)
I thought curses is included in the python distributions. What is missing?
I only need some simple, but OS-independend functions like this
c = readkey()
clearscreen()
Do you know any other module I can use?
Ingo
Michael Hudson
2003-01-31 14:38:34 UTC
Permalink
Post by Kevin Altis
The curses module is not available on Windows, as you found out when you
tried to import it. The documentation should probably make that point.
http://www.python.org/doc/current/lib/module-curses.html
the documentation says, it is available for DOS.
I thought, a DOS-Box in Windows is compatible to MS-DOS.
Reasonably, but wrongly, I think.
Do you know any alternatives for my purpose?
I only need some simple, but OS-independend functions like this
c = readkey()
clearscreen()
setcursorat(x,y)
I think, maybe, the msvcrt module might do that. Vague enough? Or
there's /F's console library.

The OS-independent part I think you will have to do yourself.

Cheers,
M.
--
An encyclopedia is about being as accurate as it can, not being
evenly misinformed. -- Coby Beck, comp.lang.lisp
Ingo Linkweiler
2003-01-29 23:20:36 UTC
Permalink
Hi,

can you explain this import error?

PythonWin 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32.
import curses
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python22\lib\curses\__init__.py", line 15, in ?
from _curses import *
ImportError: No module named _curses



I am using Python with PythonWin (also tested all 2.2.* versions and
Active Python on different machines with Win2K)
I thought curses is included in the python distributions. What is missing?

I only need some simple, but OS-independend functions like this
c = readkey()
clearscreen()
Do you know any other module I can use?

Ingo
Ingo Linkweiler
2003-01-30 17:43:06 UTC
Permalink
Post by Kevin Altis
The curses module is not available on Windows, as you found out when you
tried to import it. The documentation should probably make that point.
http://www.python.org/doc/current/lib/module-curses.html
the documentation says, it is available for DOS.
I thought, a DOS-Box in Windows is compatible to MS-DOS.

Do you know any alternatives for my purpose?
I only need some simple, but OS-independend functions like this
c = readkey()
clearscreen()
setcursorat(x,y)

Ingo

Loading...