Thomas Herve added the comment: 1315 is a duplicate of this, and I end up with a very similar solution. ---------- nosy: +therve __________________________________ Tracker <report at bugs.python.org> <http://bugs.python.org/issue1269> __________________________________