Calling C from Python

Chris Gonnerman chris.gonnerman at
Tue Feb 20 22:35:51 EST 2001

----- Original Message -----
From: "Rich Somerfield" <rich_somerfield at>
Subject: Re: Calling C from Python

> I attempted to complete the Calling Python from C [Demo/embed/demo.c] but
> couldnt get it to compile.  Could u please help me with the command?
> I was trying [on Unix] :
> cc -o new
new.c -I/opt/Python-2.0/Include -I/opt/Python-2.0 -L/opt/Python-2.0 -L/opt/P
> ython-2.0/Lib -L/opt/Python-2.0/Modules -lpython2.0

I assume this was originally one line.  What does cc tell you?

For that matter, what "Unix" are you using?  It makes a big difference.

More information about the Python-list mailing list