[Stackless] import dynamic module [pyd]
richard.m.tew at gmail.com
Mon Jul 2 10:58:54 CEST 2007
On 7/1/07, Suthat (KMITL) <dot_st at yahoo.com> wrote:
> I compiled stackless python 2.5.1 with cygwin enviroment and install
> wxPython 22.214.171.124 in site-packages directory.
> When I try
> >>> import wx
> ImportError : No module named _core_
> What's wrong with my python.
Sometimes when Python is compiled with one compiler (for instance gcc)
and extension modules like wxPython are compiled with another (for
instance Microsoft Visual C++) they are not compatible. I would go
into further detail about this, but I have never had the time to look
into it in detail.
However, it might be that this should work fine, and that this is not
working is a problem with Stackless.
Here is one thing to try which should determine where the problem is.
It should compile the Stackless source code with all the Stackless
stuff turned off, which will make it just like normal Python. If you
cannot import wx with that, then the problem is a general one with
using things compiled with Microsoft Visual C++, otherwise if you can
import wx, the problem is a general Stackless one.
1. Go into the Stackless source code, to the Stackless/stackless.h file.
2. Edit it and change "#define STACKLESS" to "#undef STACKLESS".
3. Recompile it.
4. Try to import wx again with the new version.
If you could try this and reply to the list with the results, it would
be much appreciated!
Stackless mailing list
Stackless at stackless.com
More information about the Stackless