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

Method get_screen_size

pye_pydos.py:45–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43 pass
44
45 def get_screen_size(self):
46 if Pydos_ui:
47 return [i for i in Pydos_ui.get_screensize()]
48 else:
49 self.wr('\x1b[999;999H\x1b[6n')
50 pos = ''
51 char = self.rd() ## expect ESC[yyy;xxxR
52 while char != 'R':
53 pos += char
54 char = self.rd()
55 return [int(i, 10) for i in pos.lstrip("\n\x1b[").split(';')]
56
57## test, if the Editor class is already present
58if "pye_edit" not in globals().keys():

Callers

nothing calls this directly

Calls 3

wrMethod · 0.95
rdMethod · 0.95
get_screensizeMethod · 0.45

Tested by

no test coverage detected