Python Import from .pyd doesn't work

Anurag Chourasia anurag.chourasia@gmail.com
Wed Feb 10 04:22:00 GMT 2010


Dear Cygwin Developers,

Is it possible under Cygwin Python to import modules from a .pyd
(extended DOS executable (.EXE)  -- Win32 or NT Portable format).
Please help.

My attempts to build wxPython under Cygwin have failed and hence I was
trying to use the Windows installation of wxPython by setting the
syspath under Cygwin. Here is the session transcript.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ python
Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python25.zip', '/usr/lib/python2.5',
'/usr/lib/python2.5/plat-cygwin', '/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/gtk-2.0']
>>> sys.path.append('/cygdrive/c/python26/lib/site-packages')
>>> import wxversion
>>> wxversion.select('2.8')
>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/cygdrive/c/python26/lib/site-packages/wx-2.8-msw-unicode/wx/__init__.py",
line 45, in <module>    from wx._core import *
  File "/cygdrive/c/python26/lib/site-packages/wx-2.8-msw-unicode/wx/_core.py",
line 4, in <module>    import _core_
ImportError: No module named _core_
>>>
[2]+  Stopped                 python
$ cd /cygdrive/c/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx
Guddu@RPL-REDEX /cygdrive/c/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx
$ ls -ltr /cygdrive/c/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx/*core*
-rwx------+ 1 Guddu None  568177 2009-05-14 19:42 _core.py
-rwx------+ 1 Guddu None 3168768 2009-05-14 19:54 wxmsw28uh_core_vc.dll
-rwx------+ 1 Guddu None  980992 2009-05-14 20:07 _core_.pyd
-rw-r--r--+ 1 Guddu None  755521 2010-02-10 09:38 _core.pyc
Guddu@RPL-REDEX /cygdrive/c/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx
$ file _core_.pyd
_core_.pyd:     extended DOS executable (.EXE)  -- Win32 or NT Portable format
Guddu@RPL-REDEX /cygdrive/c/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx
$
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Please Help.

Regards,
Anurag
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 60694 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20100210/80a1d88c/attachment.obj>


More information about the Cygwin-developers mailing list