On Thu, 11 Jul 2002, Nathan Cassano wrote:
> I am working on developing an application that utilizes embedded> python. My question is, can I create multiple instances of the Python> interpreter within my application? My application has multiple documents> each with their own embedded python code. I have read the Extending and> Embedding Python documentation several times and have not found the> answer.
I don't believe the Python core in its current form supports separate
interpreter instances in the one application (something I understand Tcl
can support).
You may be able to deal with this, if each "instance" is totally distinct,
by using Python threads - the master Python thread starts a thread for
each document. This probably has risks though (globals, preserved state
in some library modules, etc).
--
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au | Snail: PO Box 370
andymac at pcug.org.au | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia