Python embedded - linking problem on Linux - trying again
gerhard.haering at gmx.de
Mon Aug 12 17:07:25 CEST 2002
In article <3D57C830.4070909 at kyborg.dk>, Kim Petersen wrote:
> Gerhard Häring wrote:
>> In article <3D57BD22.8090305 at kyborg.dk>, Kim Petersen wrote:
>>>When creating an embedded python in an RM/Cobol-85 interpretor, i have the
>>>It seems that i have to link all the modules (the .so's) that i need with the
>>>new dynamic link library, isn't it at all possible to make it (the python
>>>embedded interpretor) just find the .so's like the regular interpretor does?
>> What is your problem?
>> If it is finding which libraries to link against when embedding Python, does
>> this FAQTS entry help?
> unfortunatly not ;(
> My problem is that i'm embedding - not extending.
And that's what my answer in the FAQTs entry refers to, it was only for the
wrong question ;-)
> And when doing so, i miss the references to the dynamic linked modules (like
> _tkinter.so) _unless_ i specifically link them with the new .so (the embedded
Erh. Most probably that's not the case. It's just that modules like aren't
> - from my point of view i cannot understand why the embedded python doesn't
> look at the running standard interpretors path and setup - and use those
> modules (just like it does with the .py[c] modules.....
There is no magic to it, just do the same as the Python interpreter does :-) I
only ever used embedding for debugging my extension modules, and just added the
releveant directories in my PYTHONPATH environment variable. If you don't mind
hacks, you can always modify your sys.path appropriately from your main app.
AFAIR pythonrun.c is the right place to look at for insight.
OPUS GmbH München
Tel.: +49 89 - 889 49 7 - 32
More information about the Python-list