importing embedded dynamic lib

Miki Tebeka miki.tebeka at zoran.com
Thu Jun 10 03:20:13 EDT 2004


Hello Vio,

> I have a basic dynamic lib "noddy.so" which I want to
> 1- embed inside my executable
Why? What is the reason you can have multiple files?

> 2- import by embedded python interpreter using an API call.
> 
> 1- what would be the recommended technique to embed a binary file inside
> an executable?
Have a look at what Python Installer does (or NSIS installer).
IMO the OS will need a "real" file so what you'll have to do is extract
it at runtime and then load it.

> 2- Let's imagine that I managed to load "noddy.so" into my source code
> somehow, and now have a pointer to it.
Again. I'd extract it to a temporary file and load it. This way you can
use the regular `import'.

HTH.
--
-------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
The only difference between children and adults is the price of the toys.




More information about the Python-list mailing list