Tag Archives: programming

Twisted + Pygame the Easy Way

I’ve put together a Python package called fibre. It provides helpers to make it easy to write asynchronous applications. It uses Twisted under the hood. I’ve also made a package called fibre.ui. It adds user interface support using pygame. One … Continue reading

Posted in midlength | Tagged , , , , | Comments Off on Twisted + Pygame the Easy Way

Subclass ’em Functions

Quick Summary I’ve got a simple Python helper class, in the talljosh package, that lets you write things that behave as functions but can be extended by subclassing. But Why? Consider the following Python function, found in json/encoder.py in the … Continue reading

Posted in midlength | Tagged , , , | 1 Comment

Inline Deferreds in Twisted (Without Yield)

Introduction By buffer of new stuff to blog about is getting low, so today I bring you something I played with a bit last year. After being introduced to Twisted‘s inlineDeferred decorator, I decided to have some fun with that … Continue reading

Posted in midlength | Tagged , , , , | Comments Off on Inline Deferreds in Twisted (Without Yield)

Python: Context-Sensitive Formatting

Introduction Python’s new string formatting syntax, introduced in Python 2.6, provides many advantages over the old %-based formatting.  I’ve set out to extend this string formatting, in order to help developers avoid making silly mistakes like forgetting to quote special … Continue reading

Posted in long | Tagged , , , , , , | Comments Off on Python: Context-Sensitive Formatting

Vim and Breakindent

My contention: Programmers should never have to insert line breaks into long lines of code. Why: The position of line breaks in long lines of code does not contain any semantic information.  Where coding standards limit line length, it is … Continue reading

Posted in long | Tagged , , , , , , , , , | Comments Off on Vim and Breakindent