Python 3 support for generate_indexes.py
Import print_function in generate_indexes.py