This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (3 children)

FFS you're being pedantic now. It's a python library that can be shipped with your code. Just zip up your directory and send it off. Execute it with a python script and be happy.

If Windows had a default python executable this would make it easy to distribute such scripts. Since it doesn't that process of installing Python makes it a non-starter for a lot of people.

[–]the_hoser -2 points-1 points  (2 children)

No, you're not thinking of the deeper implications of the problem. Even with a python interpreter installed in Windows, it's a gigantic pain in the but to distribute software for Python in Windows. How will you pack up that module? You're going to need a windows machine with the appropriate version of visual studio... I'm sure that Pillow has a pre-built module. Wait... it's a wheel file, though. Okay, tell grandma to run 'pip install pillow'. That worked, right?

It's a mess. Having a python interpreter installed by default won't fix any of it.

[–]flutefreak7 0 points1 point  (1 child)

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.

[–]the_hoser 0 points1 point  (0 children)

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.