[Python-Dev] disable writing .py[co] (original) (raw)

"Martin v. L�wis" martin@v.loewis.de
Mon, 20 Jan 2003 23:57:47 +0100


Guido van Rossum wrote:

Traditionally, this has been the area of environment variables (tested at the time when main() parses its arguments) and command line options. Do you really need to be able to control this dynamically during program execution?

No need is real. The specific requirement comes from

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=96111

where a user complains that mailman writes into /usr (writing actually failed, but a Secure Linux kernel detected the problem, and the user wants to silence the warning, implementing some policy).

It turns out that this is Python trying to write .pyc files. It would be desirable to turn pyc generation completely off for mailman. This could be done best through actually modifying the mailman source code. Setting an environment variable is less convenient, as you then have to find all places where mailman scripts are invoked, or have to wrap all mailman scripts.

Of course, if people think YAGNI, this could be left out in 2.3 and only be added in 2.4 if there is high demand.

Regards, Martin