def create_requirements_index_file(venv_path, requirements_file):
 index_filename = get_index_filename(venv_path)
 packages = get_package_names(requirements_file)
 with open(index_filename, 'w') as writer:
  writer.write('\n'.join(packages))
  writer.write('\n')
 return index_filename

def create_requirements_index_file ( venv_path , requirements_file ) : index_filename = get_index_filename ( venv_path ) packages = get_package_names ( requirements_file ) with open ( index_filename , 'w' ) as writer : writer . write ( '\n' . join ( packages ) ) writer . write ( '\n' ) return index_filename
creates a file .