[Python-Dev] Idea of the Month: Preprocessor

Guido van Rossum guido@python.org
Mon, 18 Mar 2002 20:54:51 -0500


> Enable a command line option [-p filename.py] and a related
> environment variable PYTHONPREPROCESS.  The new behavior of the
> interpreter would then be to submit all of its input to the
> preprocess program (a module written in pure python) and then
> interpret the result.

Instead of encumbering the standard Python interpreter, why not write
a script that runs its argument after preprocessing it, and inserts a
preprocessor in __import__.

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