Popular recipes by Arjan Molenaar http://code.activestate.com/recipes/users/1729855/2004-11-05T14:34:42-08:00ActiveState Code RecipesPseudo threads with generators and PyGTK/gnome-python (Python)
2004-11-05T06:33:06-08:00Arjan Molenaarhttp://code.activestate.com/recipes/users/1729855/http://code.activestate.com/recipes/327082-pseudo-threads-with-generators-and-pygtkgnome-pyth/
<p style="color: grey">
Python
recipe 327082
by <a href="/recipes/users/1729855/">Arjan Molenaar</a>
(<a href="/recipes/tags/pygtk/">pygtk</a>, <a href="/recipes/tags/threads/">threads</a>).
</p>
<p>A thread-like interface for those who want to "use" threads in Python with PyGTK. I use it when loading files and display a nice progress bar. The function or method you give to GIdleThread should "yield" every now and then. This makes it simpler to write code, since you do not have to care about nasty locks.</p>
Simple Aspect weaver (Python)
2004-11-05T14:34:42-08:00Arjan Molenaarhttp://code.activestate.com/recipes/users/1729855/http://code.activestate.com/recipes/276629-simple-aspect-weaver/
<p style="color: grey">
Python
recipe 276629
by <a href="/recipes/users/1729855/">Arjan Molenaar</a>
.
Revision 3.
</p>
<p>Aspects can be used to add some extra behavior to functions or methods. This behavior is added at runtime and can be useful for things like logging, tracking references and even security.</p>