DLL/Embeded interpreter wierdness
Courageous
jkraska at san.rr.com
Mon Feb 25 21:44:19 EST 2002
So. Let me see if I can phrase this right:
If I have an embedded interpreter sitting in a .dll and this
self-same dll wants to be a module for import in scripts
executed by the embedded interpreter, will this work?
I have a .dll called "lramm.dll". Before I embedded an
interpreter in it, it could be loaded (from basic python)
just fine (in otherwords, it has an init, has been tested).
I started some redisign work and embedded the interpreter
in the .dll and then executed a script (with PyRun_SimpleFile())
which contains as its first statement:
"import lramm"
The import fails.
Let me repeat myself. It's lramm.dll _itself_ which has
the "PyRun_SimpleFile()" command in it.
I've checked and rechecked: the .dll is _definitely_ in
the PYTHONPATH.
My tentative conclusion is that if the .dll is already
loaded as a consequence of dynamic linkage with main, then
Python can't "twice load it" through dlload() or whatever
routine it's using. Is that correct, or do I have another
problem?
C//
More information about the Python-list
mailing list