[Tutor] [tutor] Calling python from a c program

Varsha Purohit varsha.purohit at gmail.com
Sun Jan 20 10:33:20 CET 2008


I got the python.h file but i am getting linking errors for my program....

On Jan 20, 2008 1:18 AM, Varsha Purohit <varsha.purohit at gmail.com> wrote:

> Hi,
>    I just read about how to call python from a c program. This is the
> function for that
>
> int main()
> {
>      Py_Initialize();
>     PyRun_SampleString("print 76");
>     Py_Finalize();
>
>     return 0;
> }
>
>
> But i am getting an error of header file. python.h not found. Can anybody
> tell me where can i get this header file ?? And how can i call the python
> interpreter screen from c program ??
>
> --
> Varsha Purohit,
> Graduate Student




-- 
Varsha Purohit,
Graduate Student
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080120/2c31e290/attachment.htm 


More information about the Tutor mailing list