On Fri, 8 Apr 2011 09:15:50 -0700 (PDT)
"Edward K. Ream" <[email protected]> wrote:
> I'm trying to understand the intention of this code:
>
> def vs_reset(event):
>
> g.vs = types.ModuleType('vs')
> sys.modules['vs'] = g.vs
Ville's earlier response"
> > And if persistence is long term, is g.vs shared between different
> > outlines?
>
> g.app.db is shared between leo processes (by virtue of being PickleShareDB.
implies it's not persistent.
Looks like that code just reset vs to a blank ModuleType, which seems
to be what Ville's using as the namespace. Probably has more
functionality that type('O', (,), {}), which is what I normally use.
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.