Re: Failing in a simple embedding example of python

2006-03-01 Thread Fredrik Lundh
Themistoklis Bourdenas wrote: > Hi I'm trying the following simple test in my application: > > FILE* fp = fopen("test.py", "r"); > PyRun_SimpleFile(fp, "test.py"); > fclose(fp); > > > However I get seg fault is in PyRun_SimpleFile(fp, "test.py"). "test.py" > is an existing

Failing in a simple embedding example of python

2006-03-01 Thread Themistoklis Bourdenas
Hi I'm trying the following simple test in my application: FILE* fp = fopen("test.py", "r"); PyRun_SimpleFile(fp, "test.py"); fclose(fp); However I get seg fault is in PyRun_SimpleFile(fp, "test.py"). "test.py" is an existing file with a simple statement (print 7+4). Whe