[C++-sig] The C language for Python programmers --- PythoidC

CHEN Guang dr.cg at 126.com
Tue Mar 9 07:45:30 CET 2010


Hi, 
if you want to write and run C code in Python IDE with auto-completion
if you want to introspect into C functions and data structs 
if you hate the {} and ;  and the DOS window (console)
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/cplusplus-sig/attachments/20100309/02c2fbe8/attachment.html>


More information about the Cplusplus-sig mailing list