powerlaw.py tools.py: python3 compatibility