Python Context Manager Compared to Ruby DSLs
Python has the with
keyword that is analogous to using
in C#. It is used to manage resource access and wrap a block of code with setup and cleanup stuff. I like it. Here’s an example adapted from the Python Enhancement Proposal (PEP) 343 that introduced the implementation in Python 2.6:
How to Add Files to mpd using python-mpd2
The music player daemon, mpd
, and its client counterpart mpc
operate on a managed directory structure. All paths are relative to this root directory. You cannot make mpd
play a file from just anywhere, it seems. This is important to know when you script MPDClient
using python-mpd2
, because when you try to add any absolute path, even those pointing into the managed directory, you’ll be in trouble.
Emacs for Remote SSH Python Development

I am using Emacs for over a year now to manage my tasks. I like how I can mix tasks with long form notes in a single outline. It’s good. We had to play with vi
and emacs
for a while at University. I’m very happy I got used to the very basics of both editors because I ended up using vi a lot when SSH-ing into remote machines, and now Emacs for everything else.
Generate interactive documentation with Code Guide
Nat Pryce released Code Guide, a tool to create interactive code documentation. See his blog post announcement. It’s written in Python and works for Python and Java code. But since Python and Ruby comments look the same, parsing Ruby code works, too.