def print_tab_menu(needle, tab_entries, separator):
 for (i, entry) in enumerate(tab_entries):
  print_local(('%s%s%d%s%s' % (needle, separator, (i + 1), separator, entry.path)))

def print_tab_menu ( needle , tab_entries , separator ) : for ( i , entry ) in enumerate ( tab_entries ) : print_local ( ( '%s%s%d%s%s' % ( needle , separator , ( i + 1 ) , separator , entry . path ) ) )
prints the tab completion menu according to the following format: [needle]__[index]__[possible_match] the needle and index are necessary to recreate the results on subsequent calls .