X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb6a4098a0f2e9ae55e72ad960b3dfc134d177c9..d14a1e28567de23c586bc80017073d0c39f8d18f:/wxPython/contrib/xrc/_xrcextras.py diff --git a/wxPython/contrib/xrc/_xrcextras.py b/wxPython/contrib/xrc/_xrcextras.py deleted file mode 100644 index 9562aea2eb..0000000000 --- a/wxPython/contrib/xrc/_xrcextras.py +++ /dev/null @@ -1,38 +0,0 @@ - -# The global was removed in favor of static accessor functions. This is for -# backwards compatibility: -wxTheXmlResource = wxXmlResource_Get() - -wx.wxXmlNodePtr = wxXmlNodePtr - - - - -#---------------------------------------------------------------------- -# Create a factory for handling the subclass property of the object tag. - - -def _my_import(name): - mod = __import__(name) - components = name.split('.') - for comp in components[1:]: - mod = getattr(mod, comp) - return mod - - -class wxXmlSubclassFactory_Python(wxXmlSubclassFactory): - def __init__(self): - wxXmlSubclassFactory.__init__(self) - - def Create(self, className): - assert className.find('.') != -1, "Module name must be specified!" - mname = className[:className.rfind('.')] - cname = className[className.rfind('.')+1:] - module = _my_import(mname) - klass = getattr(module, cname) - inst = klass() - return inst - - -wxXmlResource_AddSubclassFactory(wxXmlSubclassFactory_Python()) -