Accessing dyn modules from embedded python
Max Ischenko
max at malva.com.uaREMOVE.IT
Wed Oct 9 06:18:23 EDT 2002
Jeff Davis wrote:
>
> I think you need to link the executable with the python library.
Indeed!
That works, but solution is rather brittle.
Why my embedded Python interpreter doesn't search in lib-dynload itself?
The standard /usr/bin/python2 does this just fine.
Seems like I have to include lib-dynload/*.so while linking my program to
make sure that tranlator won't produce a run-time ImportError because I
don't know which module may be imported by translator.
> Python only searches a certain set of directories, so you need to provide
> the PYTHONPATH so that it searches the right one.
Why does standard python include PWD in the search list and my embedded Python
does not?
> And if you want to deploy the app along with libraries, I would just copy
> the libraries as well as your code. Just put them all in the right
> directory and you shouldn't have a problem.
OK.
--
One of the most unpleasant features of UNIX is that commands' names are of 2
letters only and therefore are hard to memorize. That's why I use one-letter
aliases.
More information about the Python-list
mailing list