4 from __future__ import with_statement
17 Decorator that makes a generator-function into a function that will continue execution on next call
20 >>> misc.validate_decorator(make_idler)
25 @functools.wraps(func)
26 def decorated_func(*args, **kwds):
28 a.append(func(*args, **kwds))
39 @contextlib.contextmanager
40 def gtk_critical_section():
41 #The API changed and I hope these are the right calls
42 gtk.gdk.threads_enter()
44 gtk.gdk.threads_leave()
47 if __name__ == "__main__":
48 #gtk.gdk.threads_init()