Joey Hess writes: > Matthias Klose wrote: > > to avoid side effects by a custom PYTHONPATH environment variable, see > > the discussion on debian-python for the motivation. > > Wouldn't setting such a variable come under the heading of using the > rope that unix gave you? > > If I did this for python, I should also have to do it for perl which > supports similar foot-shooting via PERL5LIB, PERL5OPT, etc. > > > --- postinst-python~ 2004-01-12 01:34:58.000000000 +0100 > > +++ postinst-python 2004-02-03 12:10:36.000000000 +0100 > > @@ -1,5 +1,6 @@ > > PYTHON=#PYVER# > > if which $PYTHON >/dev/null 2>&1; then > > + unset PYTHONPATH > > DIRLIST="#DIRLIST#" > > for i in $DIRLIST ; do > > $PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i > > Seems that it might be better to use python -E here instead, if I did > make this change.
yes, that would be the correct approach.