Python Packages and You

Jean-Paul Calderone wrote an excellent blog post on the right way to structure a python project. This post will build on that post by covering concrete examples of how to write imports, how to distribute your package, and what not to do.

Read on →

Emacsclient and TRAMP

For quite a while now, I’ve done a large amount of my text editing in emacs over ssh using TRAMP. It’s extremely convenient to be able to run one instance of emacs locally instead of spawning an editor remotely and interacting with it over ssh. I’ve tried using sshfs in the past, but it’s never worked well for me in the general case. But, this isn’t a post about justifying my choices.

The other crucial part of my local emacs setup has been emacsclient. Setting my local $EDITOR to emacsclient means that I could, for example, run git commit in a terminal and edit the commit message without having to spawn a new emacs instance. Instead, emacsclient tells the existing emacs what files to edit, and waits until emacs says it’s done with them.

Until just yesterday, there was a major flaw in my setup: I couldn’t activate my local emacs instance through emacsclient on a remote host. This meant that $EDITOR had to be set to something that spawned an editor on the remote host, which was becoming increasingly frustrating.

Read on →

AMP and StartTLS

Recently, I’ve been hacking on a thing which has been using Twisted’s AMP for making remote calls. I’ve developed a bit of a fetish for SSL client certificates, so I was hoping to use that for authenticating clients. AMP does have STARTTLS support builtin, but I couldn’t find any examples! Here’s what I found and figured out, for future hackers:

Read on →