Author Archives: J. D. Bartlett

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)

Pseudo Terminals in Python

Summary In this post I’ll show you a Python script which becomes a pseudo terminal so that it can act as a man in the middle between your terminal emulator and a running process.  In my example, the Python script … Continue reading

Posted in long | Tagged , , | 2 Comments

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

Import Graphs for Python

I was doing some Trosnoth refactoring recently, and I wanted a tool that would draw import graphs of the Trosnoth subpackages.  After a quick search of the Internet didn’t give me what I wanted, I set about to write my … Continue reading

Posted in short | Tagged , , , , , , | Comments Off on Import Graphs for Python