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

Guido van Rossum guido@python.org
Mon, 20 Jan 2003 17:42:29 -0500


In http://python.org/sf/602345 (option for not writing .py[co] files) Martin suggested that in addition to a flag (-R, as in read-only), perhaps there should be an env't variable and/or a sys attribute which controls whether .py[co] files are written or not.

Opinions? If you like the idea of an env't variable or sys attribute, do you have suggestions for names? PYTHONREADONLY and sys.readonlyimport?

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?

--Guido van Rossum (home page: http://www.python.org/~guido/)