The C language like the Python, by the Python and for the Python --- PythoidC

CHEN Guang dr.cg at 126.com
Mon Mar 8 06:08:56 CET 2010


Hi, if you are interested in C-Python mixed programming, please take a look at:
http://pythoidc.googlecode.com
PythoidC is the C language like the Python, by the Python and for the Python
 
import c
c.include(c.h.stdio) 
c.include(c.h.stdlib) 
'''Annotation is free!''' 
int fib(int n): 
    if(n<=2): 
        return1 
    else: 
        return fib(n-1)+ fib(n-2) 
int main(int argc,char**argv): 
    int n //C style annotation 
    n=c.stdlib.atoi(argv[1]) 
    c.stdio.printf('fibonacci(%d)=%d\n', n, fib(n))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100308/7dce100e/attachment.html>


More information about the Python-list mailing list