Package schrodinger :: Package maestro :: Module maestro :: Class IgnoreWorkspaceChanged
[hide private]
[frames] | no frames]

Class IgnoreWorkspaceChanged

_IgnoreCallback --+
                  |
                 IgnoreWorkspaceChanged


Context manager to ignore Workspace Changed callbacks.
Example:
    maestro.workspace_changed_function_add(self.my_ws_changed)
    with maestro.IgnoreWorkspaceChanged(self.my_ws_changed):
        #WS changes in this block won't trigger self.my_ws_changed
    #Outside of the block WS changes will again call self.my_ws_changed

Instance Methods [hide private]
 
__init__(self, callback_func)
See _IgnoreCallback.__init__

Inherited from _IgnoreCallback: __enter__, __exit__

Method Details [hide private]

__init__(self, callback_func)
(Constructor)

 

See _IgnoreCallback.__init__

Parameters:
  • callback_type - What callback you're working with, these are the keys to the _callbacks dict.
  • callback_func - The method we want to disconnect (if connected) from the given callback
Overrides: _IgnoreCallback.__init__