mewlo.mpacks.core.mglobals module This file contains classes to handle Mewlo sites and site manager.any globals the system uses

We want to avoid the use of global variables like the plague
but there are some rare scenarios where we have a quantity that we may need to access from any arbitrary function and where it’s just not practical to pass around objects to facilitate lookup

from mewlo.mpacks.core.mglobals import mewlosite site = mewlosite()

All mewlo globals go in this dictionary But as a point of fact, i think we prefer to have NO globals other than the site, and let the site object hold anything else that might otherwise be considered a “global”

ATTN: As of 1/17/14 - we do NOT actually currently use any of these globals (yay). You can see that by the ‘UNUSED_‘ prefix on the get accessor functions. I’m leaving this code for now – it’s conceivable that we would still want to use this, rarely, in some logging error situation where we don’t have context.

class mewlo.mpacks.core.mglobals.MewloGlobalClass[source]
globals = {'site': None}
classmethod onimport()[source]

Return reference to site database manager.


Return True if debugmode is enabled – note that we let the SITE track the actual debugmode variable.


Return the global MewloSite reference.


Shortcut function to log a not finished message.


Set global (site) debugmode.


Set global MewloSite reference (other “globals” depend on this).