Added python3 support

Thanks Alexander Shershukov