ふにゃるんv2

もとは、http://d.hatena.ne.jp/Wacky/

ActivePython for Windowsのcursesモジュールは import できません

前に、Python for Cygwinで、cursesモジュールを使った時、他のWindows版は どうなんだろう?と思っていたんだけど、ActivePythonをインスコして検証した。


結果:使えません。


要は、↓こんなエラーが出てきます。はい。

$ python
ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "D:\APython24\lib\curses\__init__.py", line 15, in ?
    from _curses import *
ImportError: No module named _curses
>>> import curses

一応ね、cursesフォルダや .py ソースはあるのよ。
でも、下位モジュール(_curses)がないので、途中で止まるのよねん。


余談だが、試しに Python 2.4.1 for Cygwinから、 lib-dynload の _curses.dll をコピーしてもってきた所、以下のエラーが出た。

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Buffer overrun detected!

Program: D:\APython24\python.exe

A buffer overrun has been detected which has corrupted the program's
internal state.  The program cannot safely continue execution and must
now be terminated.

---------------------------
OK   
---------------------------

_curses.dll のソースを持ってきて、VC++とかでリコンパイルしたら…と、妄想したが、Cygwin版を使えば良い話なので、ここまでで諦めた。