Version specific or not?

Scott David Daniels Scott.Daniels at Acm.Org
Thu Oct 11 05:39:58 CEST 2007


Steven W. Orr wrote:
> We have an app and I'm trying to decide where the app ... .
> /usr/lib/python2.3/site-packages
> or
> /usr/lib/site-python
> 
> The latter would solve a lot of problems for me.
Fewer than you suspect

> If there are multiple versions of python installed on the same machine, 
> having a shebang that just looked for /usr/bin/python would make my life 
> a lot easier.

> * Since we distribute .pyo files, is there an issue if the .pyo was 
> built with 2.3.5 and then executed by 2.4 or 2.5?

Each python M.N.X has its own byte code for distinct values of M and/or N.
So, if you had a shared directory, not only would your users have to
be able to write to the shared directory (when they import mumble, and
mumble.pyc or mumble.pyo has been generated by a different version of
Python, they will recompile mumble.py and rewrite mumble.pyc (or .pyo).

-Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list