code: def clear(self, scope = 'screen'):
          
          #TODO: clear attributes too
          if scope == 'screen':
              bos = (0, self._get_console_info()['window']['top'])
              cols, lines = self.get_size()
              length = cols * lines
              self._clear_console(length, bos)
              self.move('beginning of screen')
          elif scope == ' beginning of line':
              pass
          elif scope == 'end of line':
              curx, cury = self._get_position()
              cols, lines = self.get_size()
              coord = (curx, cury)
              length = cols - curx
              self._clear_console(length, coord)
          elif scope == 'end of screen':
              curx, cury = self._get_position()
              coord = (curx, cury)
              cols, lines = self.get_size()
              length = (lines - cury) * cols - curx
              self._clear_console(length, coord)
          elif scope == 'line':
              curx, cury = self._get_position()
              coord = (0, cury)
              cols, lines = self.get_size()
              self._clear_console(cols, coord)
              self._set_position((curx, cury))
          elif scope == 'left':
              self.move('left')
              self.write(' ')
          elif scope == 'right':
              self.write(' ')
              self.move('left')
          else:
              raise ValueError("invalid scope to clear")
docs: see doc in Term class
          
          According to http://support.microsoft.com/kb/99261 the best way
          to clear the console is to write out empty spaces