def push_scope(): """Creates a new anonymous local variable scope on the Octave call stack and sets it as the current Octave scope. Subsequent eval, getvar and setvar calls will affect variables within this scope. This is useful to do if you call the Octave engine from within multiple Python functions, to prevent them from hampering each other's data. As such, it is advisable to always create a local scope in a production code. """ return _pytave.push_scope()
def __call__(self, *args, **kwargs): try: _pytave.push_scope() return self.func(*args, **kwargs) finally: _pytave.pop_scope()