[Bf-python] Python bug with user counts

Martin Poirier theeth at yahoo.com
Mon Jan 22 04:17:20 CET 2007


Hi,

--- Willian Padovani Germano <wgermano at superig.com.br>
wrote:

> Martin Poirier wrote:
> > If yes, there's a good reason why it wasn't
> > deallocated. We reuse the same global namespace
> > between each script so they can share values. (if
> that
> > is a good idea is debatable), so the BPyobject
> would
> > have persisted there, even if the script threw an
> > exception.
> 
> We don't. Each script has its own global dictionary,
> created for it and 
> freed once the script finishes executing. That's why
> there's the 
> Registry module, to have a persistent global dict
> where scripts can put 
> data. Glabal dict for pydrivers (and py button) is
> also persistent, 
> freed on errors. Modules themselves, though, keep
> data, so if you do 
> something like:
> 
> Blender.myvar = 10

Argh, yes of course, that's what I was thinking about,
not global. silly me.

Sorry for the confusion.

Martin



 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091



More information about the Bf-python mailing list