Alt generator: python 3 compatible