The big shots

Carsten Haese carsten at uniqsys.com
Tue Feb 19 16:15:45 EST 2008


On Tue, 2008-02-19 at 12:49 -0800, castironpi at gmail.com wrote: 
> Ok, take this one.  C is faster than Python.  It would be useful, in
> certain cases, to write C.
> 
> It is possible but inconvenient, out of the way.

Making that easier is a worthy goal...

> Date: Sat, 9 Feb 2008 11:48:51 -0800 (PST)
> Subject: C function in a Python context
> http://groups.google.com/group/comp.lang.python/browse_frm/thread/cd2f79dd12e81912/
> 
> A simple compile and link function.  Useful for basic cases; if you
> want to get fancy, don't use it.

...and THAT's your solution?!? That solution is more insane than clever.
I enjoy thinking outside the box as much as anybody, but requiring the
run-time environment to have a compiler so that it can compile a piece
of "inline C code" every time the program is run is absolutely
ludicrous.

> My suspicion is that my choices of message subjects, function names,
> and variable names, is the biggest hang up.

I think your biggest hangup is that you believe too much in your own
creativity. There are already viable solutions out there for integrating
C and Python: Pyrex, Cython, and ctypes come to mind.

-- 
Carsten Haese
http://informixdb.sourceforge.net





More information about the Python-list mailing list