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

Martin v. Löwis martin@v.loewis.de
22 Jan 2003 09:27:36 +0100


Guido van Rossum <guido@python.org> writes:

> > If you change the configuration file, Python will try to regenerate
> > the .pyc file. This is a problem for people who don't want pyc files
> > written at program execution time.
> 
> Ok, but weren't we going to give those people an explicit option?

Sure, this thread is about how to do that.

I said that there is this Debian bug, Barry said that this was a bug
in Debian itself, for not compiling all mailman source code, Matthias
said that this doesn't apply to mm_cfg.py (i.e. Debian can't ship a
precompiled mm_cfg.py), you asked what the problem is, I said that
generating mm_cfg.pyc is the problem. Net result: the Debian bug
report is still unresolved.

Now, I originally brought it up because the command line option might
not help, in this case. Mailman is invoked through scripts that start
with

#! /usr/local/bin/python

In #! scripts, adding command line options is a tricky business. In
this specific case, you could add an option. For

#! /usr/bin/env python

you couldn't, as you can have only a single argument in #! scripts.

So I withdraw the claim that the Debian bug report couldn't be solved
with a command line option. However, similar cases might not be
solvable with that option.

Regards,
Martin