by 21 · 10y ago · 0 comments
Relying on the Mac default Python keeps my binary sizes small, and Python 2.7 is good enough. While I have at least done the __future__ imports to adopt features of 3.x such as print(), a full switch to 3.x will be more trouble than it’s worth until Apple decides to install it.
The bigger reason is to make the application as useful as possible to Python extensions. If you don’t force scripts to use a particular interpreter then the entire application can be imported into almost any script, alongside any number of other modules to do interesting things. The only module that has to be compatible is the application; if by chance the application module doesn’t work with one Python version, another copy of it can exist for two Python versions. Whereas, if your application only works inside a special interpreter binary, extensions have to reinstall special versions of every module that they want to use, and possibly port an entire stack of code to support that Python version. Both approaches are workable but an unspecified interpreter is by far the more convenient way.