Fix idioms and a couple of py3k warnings. Patch by Florent Xicluna.
10 files changed