Dan Stromberg, 14.12.2009 02:51: > Has anyone already worked out a system for preprocessing (maybe via m4) > a single input file into two output files: one a plain .py, and on a .pyx? > > I sometimes prefer a pure python version of a dependency if I can get > it, because it makes the ongoing maintenance costs lower than compiling > (and recompiling) extension modules would. It seems like due to the > similarities between .py and .pyx, there should be a way of maintaining > both as a single document - so people who want the speed can have it, > and people who want convenience can have that, but the programmer > doesn't end up maintaining two versions of said dependency. > > I googled, but didn't find anything that looked relevant, other than > pages about how to use various preprocessors.
I assume you know that Cython can compile .py files and has a pure Python syntax for type declarations? http://wiki.cython.org/pure Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
