diff options
author | Stefan Behnel <scoder@users.berlios.de> | 2009-02-08 09:08:20 +0100 |
---|---|---|
committer | Stefan Behnel <scoder@users.berlios.de> | 2009-02-08 09:08:20 +0100 |
commit | 94903a17047793a3883250642b617947e06dec0b (patch) | |
tree | 9061f631dc02a6d5cf6e880906f38df5b4c29677 /pyximport/pyximport.py | |
parent | beeac2cc7530fc44de38d19a021ef4409fbf5a86 (diff) | |
download | cython-94903a17047793a3883250642b617947e06dec0b.tar.gz |
additional note on importing .py files with pyximport
Diffstat (limited to 'pyximport/pyximport.py')
-rw-r--r-- | pyximport/pyximport.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pyximport/pyximport.py b/pyximport/pyximport.py index 2aa1bf20b..42e397ff2 100644 --- a/pyximport/pyximport.py +++ b/pyximport/pyximport.py @@ -14,6 +14,17 @@ For instance on the Mac with a non-system Python 2.3, you could create sitecustomize.py with only those two lines at /usr/local/lib/python2.3/site-packages/sitecustomize.py . +Since Cython 0.11, the :mod:`pyximport` module also has experimental +compilation support for normal Python modules. This allows you to +automatically run Cython on every .pyx and .py module that Python +imports, including parts of the standard library and installed +packages. Cython will still fail to compile a lot of Python modules, +in which case the import mechanism will fall back to loading the +Python source modules instead. The .py import mechanism is installed +like this:: + + pyximport.install(pyimport = True) + Running this module as a top-level script will run a test and then print the documentation. |