play nice with py3k

python 3 doesn't seem to like the parametric,
plus a few missing print parentheses