Having problems with standard modules with embedded python.

Gordon Scott gordon.scott at peregrine.com
Fri Jan 4 12:03:22 EST 2002


Hi all,

I hope somebody can point out something I'm missing.  I've been looking
through
the archives but can't seem to find anything related directly to the problem
I 
seem to be having.

I have embedded python in to a windows application.  
I downloaded Python21 and installed from the windows installer.  
I then embedded python by linking to the python21.lib

Everything up to this point works fine, I am successfully calling/running a
python script from my application. 

However, in the script I am running I am trying to use urllib.py, this
imports
socket.py and this is failing with a

"ImportError: No module named _socket"

I have a PYTHONPATH environment variable pointing directly to
"E:\Python21\DLLs" directory
in my python installation, but it still seems like the _socket.pyd file is
not being found or loaded, yet when I start an interpreter from the command
line and enter
>>>import socket
all goes well...

Any Ideas???





More information about the Python-list mailing list