Python code -> to C code

Duncan Booth duncan at NOSPAMrcp.co.uk
Wed Apr 30 04:13:54 EDT 2003


claird at lairds.com (Cameron Laird) wrote in
news:vatlfeb16jlled at corp.supernews.com: 

> In article <Xns936C8AB67B739duncanrcpcouk at 127.0.0.1>,
> Duncan Booth  <duncan at rcp.co.uk> wrote:
>                .
>                .
>                .
>>The easiest solution is to leave the program in Python and just call
>>the relevant functions from C. Possibly the easiest way to do this
>>would be to use Pyrex.
>                .
>           [persuasive illustration]
>                .
>                .
> ctypes <URL: http://starship.python.net/crew/theller/ctypes.html >
> should be even easier to use.

Does ctypes support embedding? If so, it isn't obvious from that webpage.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list