[Pyrex] Cython development

Robert Bradshaw robertwb at math.washington.edu
Tue Mar 18 23:36:45 CET 2008


On Mar 18, 2008, at 10:24 AM, Francesc Altet wrote:

> A Tuesday 18 March 2008, Chris Mellon escrigué:
>> On Fri, Mar 14, 2008 at 7:31 PM, Greg Ewing
> <greg.ewing at canterbury.ac.nz> wrote:
>>> Stefan Behnel wrote:
>>>> Then put a clear warning into the docs/FAQ: "the C files are
>>>> generated, please ignore them when reading the source".
>>>
>>>  Pyrex already puts a note at the top of the .c file
>>>  indicating that it was generated. I could perhaps
>>>  enhance it to include a warning against editing by
>>>  hand, although I think to most people it would be
>>>  fairly obvious from the appearance of the code that
>>>  you're not meant to do that!
>>>
>>>  --
>>
>> And really, as generated C source goes, Pyrex/Cython produce some of
>> the easiest to read I've ever seen. The inclusion of the source (with
>> line numbers and context!) for each chunk of the generated C code is
>> great.
>
> Yeah, i definitely agree with this.  When things go wrong, it is quite
> easy to have a look at C sources.  Thanks for that!

If you're using Cython, you can use the -a option and it will  
produced an html of your source (colorized according to how much  
Python is being used, and the lines are clickable (expanding to the  
C). See, for example http://sage.math.washington.edu/home/robertwb/ 
cython/polynomial_element.pyx.html

- Robert




More information about the Pyrex mailing list