MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / get_screen_size

Method get_screen_size

pye.py:1138–1145  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1136 except ImportError:
1137 pass
1138 def get_screen_size(self):
1139 self.wr('\x1b[999;999H\x1b[6n')
1140 pos = ''
1141 char = self.rd()
1142 while char != 'R':
1143 pos += char
1144 char = self.rd()
1145 return [int(i, 10) for i in pos.lstrip("\n\x1b[").split(';')]
1146if "pye_edit" not in globals().keys():
1147 from pye import pye_edit
1148def pye(*args, tab_size=4, undo=50):

Callers 1

redrawMethod · 0.45

Calls 2

wrMethod · 0.95
rdMethod · 0.95

Tested by

no test coverage detected