Archives
-
Extending Python with (almost) anything
Among the various methods of extending Python about which I have written, Python 2.5′s ctypes module is possibly the easiest. Submit article
Mar 24th, 2008 | Filed under Software -
Threading in Django
Profitable use of threading in web development is rare, particularly when contending with Python’s global interpreter lock. There are a few notable exceptions to this. Submit article
Mar 7th, 2008 | Filed under Software -
Psyco and Django
Psyco is a module that optimizes Python applications on the fly. Numerous resources online describe how to use psyco in a Django-powered application to speed it up. Submit article
Feb 15th, 2008 | Filed under Programming, Tips -
Per-user caching in Django
Django comes with an easy-to-use caching framework. With a few simple decorators, an application’s views are cached. Decorators can even be used to control upstream caches, such as those maintained by ISPs. Nevertheless, if a rendered view is customized with information individual to a user, these caching options cease to be useful. Submit article
Feb 12th, 2008 | Filed under Programming, Tips -
Partial application and currying
Currying, known in Python land as partial application, is a technique in which a function taking multiple arguments composes a function that takes fewer arguments (in most languages, reducing to one, although this is not the case in Python) by partially applying it to given parameters. For example, a function, sum, might be used to [...]
Dec 4th, 2007 | Filed under Programming