code: def preview(self, stream=sys.stdout):
          write = stream.write
          write(('[Quick preview of Docpie %s]' % self._version).center(80, '='))
          write('\n')
          write(' sections '.center(80, '-'))
          write('\n')
          write(self.usage_text)
          write('\n')
          option_sections = self.option_sections
          if option_sections:
              write('\n')
              write('\n'.join(option_sections.values()))
          write('\n')
          write(' str '.center(80, '-'))
          write('\n[%s]\n' % self.usage_name)
          for each in self.usages:
              write('    %s\n' % each)
          write('\n[Options:]\n\n')
          for title, sections in self.options.items():
              if title:
                  full_title = '%s %s' % (title, self.option_name)
              else:
                  full_title = self.option_name
              write(full_title)
              write('\n')
              for each in sections:
                  write('    %s\n' % each)
              write('\n')
          write(' repr '.center(80, '-'))
          write('\n[%s]\n' % self.usage_name)
          for each in self.usages:
              write('    %r\n' % each)
          write('\n[Options:]\n\n')
          for title, sections in self.options.items():
              if title:
                  full_title = '%s %s' % (title, self.option_name)
              else:
                  full_title = self.option_name
              write(full_title)
              write('\n')
              for each in sections:
                  write('    %r\n' % each)
              write('\n')
          write(' auto handlers '.center(80, '-'))
          write('\n')
          for key, value in self.extra.items():
              write('%s %s\n' % (key, value))