code: def prettyprint(datastr):
      
      maxwidth = WPToolsQuery.MAXWIDTH
      rpad = WPToolsQuery.RPAD
  
      extent = maxwidth - (rpad + 2)
      for line in datastr:
          if len(line) >= maxwidth:
              line = line[:extent] + '...'
          utils.stderr(line)
docs: Print page data strings to stderr