[Python-Dev] towards a stricter definition of sys.executable

Phillip J. Eby pje at telecommunity.com
Thu Mar 16 20:29:50 CET 2006


At 07:40 PM 3/16/2006 +0100, Fredrik Lundh wrote:
>Looks like I might have to withdraw my (d) proposal, and, once again, suggest
>that we stick to the "GetProgramFullPath" sense, as implemented, and add a
>new variable for the originally intended but not really implemented "GetInter-
>preterPath" sense...

Note that the stdlib and tools often use the (b) interpretation.  For 
example, the distutils does byte-compilation of files by invoking 
sys.executable.  So these would need to be changed.  (This in fact is why I 
couldn't use exemaker to wrap easy_install on Windows and had to create my 
own wrapper that exec()'s Python rather than linking to it.)

Basically, no matter how this is clarified, some code somewhere is going to 
have to change.

(On the bright side, we could get rid of the distutils hack in 2.5 if 
compile() allowed you to set the optimization level.)



More information about the Python-Dev mailing list