def DECRQM(mode, DEC): """Requests if a mode is set or not.""" AssertVTLevel(3, "DECRQM") if DEC: escio.WriteCSI(params=[mode], intermediate='$', prefix='?', final='p') else: escio.WriteCSI(params=[mode], intermediate='$', final='p')
def HVP(point=None, row=None, col=None): """ Move cursor to |point| """ if point is None and row is None and col is None: escio.WriteCSI(params=[], final="H") elif point is None: if row is None: row = "" if col is None: escio.WriteCSI(params=[row], final="H") else: escio.WriteCSI(params=[row, col], final="H") else: escio.WriteCSI(params=[point.y(), point.x()], final="f")
def CUB(Ps=None): """Cursor left Ps times.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="D")
def XTERM_RESTORE(Ps=None): """Restore given DEC private mode parameters.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, prefix="?", final="r")
def VPA(Ps=None): """Move to line |Ps|. Default value is 1.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="d")
def SU(Ps=None): """Scroll up by |Ps| lines. Default value is 1.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="S")
def RM(Pm=None): """Reset mode.""" if Pm is None: params = [] else: params = [Pm] escio.WriteCSI(params=params, final="l")
def IL(Pn=None): """Insert |Pn| blank lines after the cursor. Default value is 1.""" if Pn is None: params = [] else: params = [Pn] escio.WriteCSI(params=params, final="L")
def DECDC(Pn=None): """Delete column at cursor.""" if Pn is not None: params = [Pn] else: params = [] escio.WriteCSI(params=params, intermediate="'", final="~")
def DCH(Ps=None): """Delete Ps characters at cursor.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="P")
def DA2(Ps=None): """Request secondary device attributes.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, prefix='>', final="c")
def DA(Ps=None): """Request primary device attributes.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="c")
def CUU(Ps=None): """Cursor up Ps times.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="A")
def CUF(Ps=None): """Cursor right Ps times.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="C")
def CUD(Ps=None): """Cursor down Ps times.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="B")
def ECH(Pn=None): """Erase |Pn| characters starting at the cursor. Default value is 1.""" if Pn is None: params = [] else: params = [Pn] escio.WriteCSI(params=params, final="X")
def HPA(Pn=None): """Position the cursor at the Pn'th column. Default value is 1.""" if Pn is None: params = [] else: params = [Pn] escio.WriteCSI(params=params, final="`")
def DECIC(Pn=None): """Insert column at cursor.""" if Pn is not None: params = [Pn] else: params = [] escio.WriteCSI(params=params, intermediate="'", final="}")
def ICH(Pn=None): """ Insert |Pn| blanks at cursor. Cursor does not move. """ if Pn is None: params = [] else: params = [Pn] escio.WriteCSI(params=params, final="@")
def DECSASD(Ps=None): """Direct output to status line if Ps is 1, to main display if 0.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, intermediate='$', final="}")
def REP(Ps=None): """Repeat the preceding character |Ps| times. Undocumented default is 1.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="b")
def DECSCA(Ps=None): """Turn on character protection if Ps is 1, off if 0.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, intermediate='"', final="q")
def SM(Pm=None): """Set mode.""" if Pm is None: params = [] else: params = [Pm] escio.WriteCSI(params=params, final="h")
def DECSCUSR(Ps=None): """Set cursor style 0 through 6, or default of 1.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, intermediate=' ', final="q")
def TBC(Ps=None): """Clear tab stop. Default arg is 0 (clear tabstop at cursor).""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="g")
def DECSEL(Ps=None): """Like EL but respects character protection.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, prefix='?', final="K")
def VPR(Ps=None): """Move down by |Ps| rows. Default value is 1.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="e")
def DL(Pn=None): """Delete |Pn| lines at the cursor. Default value is 1.""" if Pn is None: params = [] else: params = [Pn] escio.WriteCSI(params=params, final="M")
def XTERM_SAVE(Ps=None): """Save given DEC private mode parameters.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, prefix="?", final="s")
def CPL(Ps=None): """Cursor up Ps times and to the left margin.""" if Ps is None: params = [] else: params = [Ps] escio.WriteCSI(params=params, final="F")