r/Python • • Sep 15 '15

Ask microsoft to include Python in Windows by default

https://windows.uservoice.com/forums/265757-windows-feature-suggestions/suggestions/6693586-ship-python-3-and-python-2-with-windows-10
1.2k Upvotes

329 comments sorted by

View all comments

Show parent comments

1

u/flutefreak7 Sep 17 '15

Wouldn't you just put pillow and your script in a folder with an init file, zip it, then email the zip file along with a py file that just calls python app.zip ... the system python would then execute the application. The system already has stdlib, and the zip has any 3rd party libs. I haven't done this, but all of this seems doable, and prevents actually bundling python.exe or stdlib modules.

1

u/the_hoser Sep 17 '15

It's a little more challenging than that, but yes, it's doable. The zipapp module that shipped with 3.5 shows promise (being able to execute the zip file itself), but I don't know if it correctly bundles shared libraries, and if those shared libraries are usable in that form.

Regardless, even if it does work, you'll need a shared library build for every platform you intend to run the application on. With a python version bundled in windows, this isn't so bad. On os x its not so bad, either. On Linux...

Well Linux remains the redheaded problem child in this regard.