the general development using Python

Chris Angelico rosuav at gmail.com
Tue Jul 9 05:07:07 CEST 2013


On Tue, Jul 9, 2013 at 11:45 AM,  <ajetrumpet at gmail.com> wrote:
> I have to get back into writing Python but I'm lacking one thing ... a general understanding of how to write applications that can be deployed (either in .exe format or in other formats).

That's one last thing you need to un-learn, then :)

You distribute Python applications simply as they are - as a .py file
(or a collection of .py files), and your users run them. It's really
that simple!

In fact, deploying to .exe or equivalent would restrict your users to
those running a compatible OS (same OS, same word/pointer size (32-bit
or 64-bit), possibly other restrictions too), whereas deploying the
.py files just requires that they have a compatible Python interpreter
installed. Target the three most popular desktop platforms all at
once, no Linux/Windows/Mac OS versioning. Target the lesser-known
platforms like OS/2 with the same script. And completely eliminate the
"compile step", which might take a long time with large projects.
(Okay, your code does still get compiled, but the interpreter manages
all that for you. All you need to know is that the .pyc files don't
need to be distributed.)

Python - like most other modern high level languages - is designed to
save you the hassle of working with the details. This is another of
those hassle-savings. :)

ChrisA



More information about the Python-list mailing list