]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/core.i
Regenerated makefiles.
[wxWidgets.git] / wxPython / src / core.i
index 5dd883fdc1e8be30223a737703360ecc166c22fb..b10d9d60dfdc5c3d348deceaf4ace82c19fe089e 100644 (file)
@@ -39,11 +39,32 @@ _core_._wxPySetDictionary(vars())
 %#// be used here.
 import sys as _sys
 wx = _sys.modules[__name__]
-}
 
+}
 #endif
 
 
+%pythoncode {
+%#----------------------------------------------------------------------------
+
+def _deprecated(callable, msg=None):
+    """
+    Create a wrapper function that will raise a DeprecationWarning
+    before calling the callable.
+    """
+    if msg is None:
+        msg = "%s is deprecated" % callable
+    def deprecatedWrapper(*args, **kwargs):
+        import warnings
+        warnings.warn(msg, DeprecationWarning, stacklevel=2)
+        return callable(*args, **kwargs)
+    deprecatedWrapper.__doc__ = msg
+    return deprecatedWrapper
+    
+                   
+%#----------------------------------------------------------------------------
+}
+
 
 //---------------------------------------------------------------------------
 // Include all the files that make up the core module