[Python-Dev] disable writing .py[co]

Guido van Rossum guido@python.org
Tue, 21 Jan 2003 20:01:00 -0500


> > That particular bug is because the debian package isn't/wasn't
> > complete.  In a from-source installation of Mailman, we do indeed run
> > compileall.py on all the Python files.  From skimming the debian bug
> > report, it looks like they fixed their post-install script to do the
> > same.
> 
> yes, but one file mm_cfg.py is a configuration file, which should not
> be compiled. This is not specific to mailman. A core configuration
> file is site.py, which shouldn't be compiled as well, so here it would
> make sense to use a sys.<dontcompileflag>.

What's the problem with compiling mm_cfg.py or site.py?  As long as
you don't delete the .py file, the .pyc file acts only as a cache.  I
see no need to avoid compilation.  (Unlike Emacs, Python only uses the
.pyc file if the timestamp in its header *matches exactly* the mtime
of the corresponding .py file, *or* if there is no .py file.)

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