Welcome to pyexpander’s documentation!

pyexpander - a powerful turing complete macro processor

pyexpander is a macro processor that allows to embed python code in text files.

Some of the features are:

  • Variables like $(VAR) are replaced.
  • Valid python expressions like $(2+3/2) are evaluated.
  • Arbitrary python code like in $py(import math; math.pi) can be executed.
  • The functionality is available as a script and a python library.
  • The program is availiable for python version 2 and version 3.

See Introduction to pyexpander for more information.

Author:Goetz Pfeiffer (Goetz.Pfeiffer@helmholtz-berlin.de, goetzpf@googlemail.com)

Download and install

By using pip, installing pyexpander is a single line command. This and other installation methods are described in

Installing pyexpander

pyexpander and sourceforge

You find the sourceforge summary page for pyexpander at pyexpander.

Repository access

You can either access the software repository by a web interface:

browse pyexpander repository.

Or, if you plan to extend or improve pyexpander I would recommend that you get a clone of the repository with this command:

hg clone ssh://goetzpf@hg.code.sf.net/p/pyexpander/code pyexpander

You can then commit changes in your own repository copy.

If you plan to share these changes you can create a mercurial bundle and send it to my e-mail address.

Indices and tables