Quentin Fraser writes:
>There is good documentation for extending python, but only a brief mention
>of embedding it in other applications. Have I missed anything?
At the time I wrote that documentation it hadn't been done yet but the
code was designed to make it very simple.
>Are there guidelines for doing this?
Not yet. As it's so simple, they follow below...
>Have many people done it?
At least one company has done it (for a GUI builder), one university
(for a VR system), and one person in my building (for an OO multimedia
system). There may be more...
>Is it just a case of calling routines in pythonrun.h?
Basically, yes. If you look at pythonmain.c, you'll see in what order
things have to be initialized:
/* optind is the index of the script name in argv */
After this you are free to call any of the run* functions or
call_object() any time you like (or anything else that's available to
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>