C app and Python

2006-12-31 Thread Vertilka
Hi,
I need to create an application that the user ask for python script to
run.
this script will call the C application functions (in my app. the
function will draw on screen).

Do I need to create an extension ? Note that this is not a DLL, but a C
application.
or I need to embed Python in my C application.

Thanks,
Vertilka

-- 
http://mail.python.org/mailman/listinfo/python-list


Extending Embedded Python and execute external script

2007-01-04 Thread Vertilka
What i need from my C application to do ?
1) To execute a python script from file.
2) The python script will call functions in my C application.

According to the answer from Ravi Teja (topic "C app and Python"), I
need to extend embedded python in my C application.

I saw several functions: PyRun_AnyFileExFlags, PyRun_SimpleFileExFlags,
PyRun_FileExFlags.

Questions:
1) Which one should i use in order to achieve what i need ?
2) I couldn't understand the differance betwwen the three ?
3) What is the difference between the "FILE *fp" and "const char
*filename" arguments of these functions. If i give a FILE*, why do i
need to give the file name ?

Tnx,
Vertilka

-- 
http://mail.python.org/mailman/listinfo/python-list