python scripts for indexing