def create_pip_index(scratch_directory, packages):
 index_file = scratch_directory.child('index.html')
 with index_file.open('w') as f:
  template.flatten(None, PackagesElement(packages), f.write)
 return index_file

def create_pip_index ( scratch_directory , packages ) : index_file = scratch_directory . child ( 'index.html' ) with index_file . open ( 'w' ) as f : template . flatten ( None , PackagesElement ( packages ) , f . write ) return index_file
create an index file for pip .