ImportError in embedded Python Interpreter

googler.1.webmaster at spamgourmet.com googler.1.webmaster at spamgourmet.com
Thu Jan 29 14:07:01 EST 2009


Hi,

i have a problem. I compiled Python and the socket module so I got
this structure. (all on windows)

C:\test\dll_files\python25.dll
C:\test\my_app
C:\test\dll_files\DLLs\
C:\test\dll_files\python.exe

If I run python.exe I get the console and I can call "import socket"
which
succeeds. I wrote a small console app which is stored in C:\test\ and
embeddeds the python interpreter. I set the environment variable PATH
so the python25.dll can be load.

But when I want to import the socket module in a script, it fails.
(The interpreter works fine, just importing files in the DLLs folder
fail). Why? When I print out the sys.path in my app I get the same
like in the
real python.exe.

What do you think, whats missing?

Thanks a lot. bye :)



More information about the Python-list mailing list