Python, Be Bold!

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Jan 3 17:50:06 EST 2020


On 3/01/20 3:31 pm, Abdur-Rahmaan Janhangeer wrote:

> But, this proposal is not about native executables. It's about a .jar like
> executable. 

You can pass a zip file with a .pyz extension to the python
interpreter and it will look for a __main__.py file and run
it.

That seems to give you all the functionality of a jar --
including the limitations (e.g. you can't bundle extension
modules or native libraries that way).

Py2exe comes with zipextimporter, which purports to be able
to load .pyd files from zip archives, but I'm not aware of an
equivalent for other platforms.

Perhaps getting zipextimporter into the standard library,
and developing versions of it for Linux and MacOS, would be
a useful improvement?

-- 
Greg


More information about the Python-list mailing list