m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.6 KiB

6 months ago
  1. from __future__ import print_function, unicode_literals, absolute_import
  2. class baseconsole(object):
  3. def __init__(self):
  4. pass
  5. def bell(self):
  6. raise NotImplementedError
  7. def pos(self, x=None, y=None):
  8. '''Move or query the window cursor.'''
  9. raise NotImplementedError
  10. def size(self):
  11. raise NotImplementedError
  12. def rectangle(self, rect, attr=None, fill=' '):
  13. '''Fill Rectangle.'''
  14. raise NotImplementedError
  15. def write_scrolling(self, text, attr=None):
  16. '''write text at current cursor position while watching for scrolling.
  17. If the window scrolls because you are at the bottom of the screen
  18. buffer, all positions that you are storing will be shifted by the
  19. scroll amount. For example, I remember the cursor position of the
  20. prompt so that I can redraw the line but if the window scrolls,
  21. the remembered position is off.
  22. This variant of write tries to keep track of the cursor position
  23. so that it will know when the screen buffer is scrolled. It
  24. returns the number of lines that the buffer scrolled.
  25. '''
  26. raise NotImplementedError
  27. def getkeypress(self):
  28. '''Return next key press event from the queue, ignoring others.'''
  29. raise NotImplementedError
  30. def write(self, text):
  31. raise NotImplementedError
  32. def page(self, attr=None, fill=' '):
  33. '''Fill the entire screen.'''
  34. raise NotImplementedError
  35. def isatty(self):
  36. return True
  37. def flush(self):
  38. pass