docs: def display_listitems(items, url):
      '''Displays a list of items along with the index to enable a user
      to select an item.
      '''
      if (len(items) == 2 and items[0].get_label() == '..'
          and items[1].get_played()):
          display_video(items)
      else:
          label_width = get_max_len(item.get_label() for item in items)
          num_width = len(str(len(items)))
          output = []
          for i, item in enumerate(items):
              output.append('[%s] %s (%s)' % (
                  str(i).rjust(num_width),
                  item.get_label().ljust(label_width),
                  item.get_path()))
  
          line_width = get_max_len(output)
          output.append('-' * line_width)
  
          header = [
              '',
              '=' * line_width,
              'Current URL: %s' % url,
              '-' * line_width,
              '%s %s Path' % ('#'.center(num_width + 2),
                              'Label'.ljust(label_width)),
              '-' * line_width,
          ]
          print '\n'.join(header + output)