Interactive interpreter in embedded Python

Bjarke Dahl Ebert bebert at worldonline.dk
Sat May 4 09:05:47 EDT 2002


Hello,

When you write a Python extension in C(++), it is very easy to play with it
from the shell. Just open an interactive interpreter and import the
extension module.

But what if you have an application embedding a Python interpreter? Then it
would also be nice, at least during development, to be able to get a "Python
prompt" to play with functions exported from the application, etc.

So, after calling Py_Initialize and initializing my Python extensions, what
is the easiest way to open a Python Shell in a window?
I'm programming in Win32. Either IDLE or PythonWin would be fine.

If the C application is (natively) graphical, will I get problems with
IDLE/PythonWin interfering with the message handling loop of the
application?


Kind regards,
Bjarke







More information about the Python-list mailing list