Skip to main content

Run c-style preprocessor directives in python modules

Project description


  • support c-style directives in python
  • can run post-processed code on-the-fly
  • can output to a file
  • can strip all pre-processor data from the output
  • #defines can be set in code prior to processing

Supported Directives

  • #define
  • #undef
  • #ifdef
  • #else
  • #endif
  • #exclude
  • #endexclude

Python Interpreter Compatibility

pypreprocessor itself was originally designed to provide developers
with a simple solution to write python 2x and python 3x code in the same source file so compatibility is a must.
Currently pypreprocessor has been tested and works in:
  • 2.5
  • 2.6
  • 3.0
  • 3.1
2.4 support has been looked into and can easily be made possible if
users request it.
There are no plans to support earlier versions of python unless
there is sufficient demand from users.


For more extensive information on features, access to the source
repository, documentation, or examples of use cases involving pypreprocessor be sure to visit the project’s Home Page.

Project details

Release history Release notifications

History Node


History Node


History Node


History Node


History Node


This version
History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pypreprocessor-0.4.0.linux-i686.exe (66.9 kB) Copy SHA256 hash SHA256 Windows Installer any Jun 20, 2010
pypreprocessor-0.4.0.tar.gz (5.3 kB) Copy SHA256 hash SHA256 Source None Jun 20, 2010

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page