Basically, I'm working with zipimport to load plugins.
These plugins contain binary modules which can only be loaded via retrieving their data.

Copying them to a temporary directory is stupid, so how can I get a handle to a dynamic process which I can inject the stream into before it's execution??

Cross-platform would be nice ;)

I would also like to extend this with the possibility of importing zipped eggs and wheels from the zipimport instance.

BBasically, Pillow, the uupgrade from PIL, is required by one of my plugins.
CCurrently, I have to copy the portable egg (some eggs are not portable) out of the zipped plugin to a temporary directory before I can iimport it.

Is there any way to simply import it without copying??

Btw excus . The grammar errors, auto-kkeyboards on aandroi . Suck

Sorry for a D-post, it ttakes me so much longer to type on a phone...

I fforgot to mention py2exe has memimport.pyd which can import pyd files from zip archives.

ok, so from the looks of it, the logic of what I'm trying to do with DLL injection seems to follow that of:
- create a new empty process named after the DLL being injected
- get the handle to the process
- inject the retrieved DLL data into the process via it's handle
- create a new ctypes.CDLL instance with the process handle, named after the DLL

how can I do this??
(it would be through kernel32 on windows/wine right??)

I'm not sure about the logic for importing zipped eggs and such

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.