[Bf-python] questions about python sub-interpreters

Willian Padovani Germano wgermano at ig.com.br
Sat Sep 6 06:10:18 CEST 2003


Hi, Thomas

Sorry to take long to answer.

From: "Thomas Dyar" <tdyar at MIT.EDU>
> I would like to change the way the game engine python is initialized from
> within blender (embedded). I think it should be started as a
> sub-interpreter so that the currently running scripts can still run when
> the game finishes. Will this cause major problems?

No, you're right.  The way things are heading, some scripts may stay "on"
just like normal Blender spaces, it wouldn't be wise to simply close
everything, then.

I've been changing the way we use global dictionaries (not finished yet,
it's part of a bigger move).  The main objective is to have a nicer way of
preserving data without letting the global dict get too much leftover data.
One consequence of my changes (wrote about the main part of this a few days
ago to this list) is that we'll not end/restart the Interpreter so many
times.

While working on this I saw what the game engine prep code does (closes
current process, start a new one).  And I agree that it doesn't need to be
done this way.

> Any other ways to get a similar effect anyone can think of?

Being adventurous: you may want to investigate if we can join both sets of
Blender modules (normal and game) in a single environment.  I have no idea
if this would work, though.  The original programmers wanted this, but for
some reason didn't do it.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list