ENH: made python3 compliant

@asmeurer