Why, oh why, have I never noticed the python pipes module before.