diff --git a/etg/utils.py b/etg/utils.py index 9084c602..a8cf7610 100644 --- a/etg/utils.py +++ b/etg/utils.py @@ -37,10 +37,15 @@ def run(): module.addHeaderCode('#include ') module.addHeaderCode('#include ') + c = module.find('wxWindowDisabler') assert isinstance(c, etgtools.ClassDef) c.mustHaveApp() c.addPrivateCopyCtor() + # add context manager methods + c.addPyMethod('__enter__', '(self)', 'return self') + c.addPyMethod('__exit__', '(self, exc_type, exc_val, exc_tb)', 'pass') + module.find('wxQsort').ignore() module.find('wxGetEmailAddress').findOverload('buf').ignore()