[Python-Dev] Proto-PEP regarding writing bytecode files
Skip Montanaro
skip@pobox.com
Thu, 23 Jan 2003 11:47:37 -0600
Guido> - The envvar needs to have a name starting with "PYTHON". See
Guido> Misc/setuid-prog.c for the reason.
Guido> - PYC may not be the best name to identify the feature, since
Guido> there's also .pyo. Maybe PYTHONBYTECODEDIR? I don't mind if
Guido> it's long, the feature is obscure enough to deserve that.
I switched to PYTHONBYTECODEBASE. "...DIR" suggests that all bytecode will
be written to that one directory. "...BASE" implied more that it's the root
of a tree. I suppose "...ROOT" would also be okay.
Guido> - If the directory it refers to is not writable, attempts to
Guido> write are skipped too (rather than always attempting to write
Guido> and catching the failure).
Yes, see the pep. At startup, sys.pythonbytecodebase is set based upon what
it finds in the environment. Its value is then used at runtime (faster, and
under user control should there be a crying need to make runtime changes to
the location).
Guido> - There are two problems in this line:
...
Both fixed, thanks.
Skip