parente.dev

Activating a virtualenv in supervisord

February 14, 2011

Here's a little script I started using today to activate a virtualenv, run a command in it, then deactivate the environment.

It works well in supervisord program sections.

Another Read: Error Handlers in dojo.Deferred Chains »

Starting in 1.5, Dojo's Deferred class exposes a then() method that accepts three arguments: a success handler for callback(), an error handler for errback, and a progress handler for progress() updates. One interesting feature of the dojo.Deferred implementation is the ability of a callback handler to return a new deferred which becomes the target of the next handler scheduled on the original deferred.