
Hello,
I managed to embed Python interpreter and now I would like to include all of the standard library with the app.
I built Python from source and it created a folder "lib/python3.3" with all the libraries, it seems. Before I do "Py_Initialize()" I had to do "Py_SetPath()" pointing to the application directory (there I copied the whole "lib"). It works but I have a few questions. Please:
I had to set path to both "lib" and to "lib/lib-dynload" - why is that? If I remember correctly, on Windows there used to be two directories "Lib" and "libs" (?) - one containing C extensions and the other one pure Python modules. That has changed? In any case, why do I have to point to the "lib-dynload" as well, why can't the interpreter recursively search the top most "lib"? And if I wanted to include new modules, should I put them inside "site-packages"?
the docs say, "The path components should be separated by semicolons" that is ";" - but I had to use ":" - I'm on Mac, maybe the are the docs Windows specific?
to enable Python to import stdlib, is it the right way to do so with "Py_SetPath()"? Or are there other idioms?
I read somewhere sometime that it may be possible to incude giant .zip file, instead of all the libraries files (.py, .so) - is it true? How does a script import from such an archive?
I hope you don't mind such newbie questions...
participants (1)
-
ecir hana