示例#1
0
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')
示例#2
0
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")
示例#3
0
def CUB(Ps=None):
    """Cursor left Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="D")
示例#4
0
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")
示例#5
0
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")
示例#6
0
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")
示例#7
0
def RM(Pm=None):
    """Reset mode."""
    if Pm is None:
        params = []
    else:
        params = [Pm]
    escio.WriteCSI(params=params, final="l")
示例#8
0
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")
示例#9
0
def DECDC(Pn=None):
    """Delete column at cursor."""
    if Pn is not None:
        params = [Pn]
    else:
        params = []
    escio.WriteCSI(params=params, intermediate="'", final="~")
示例#10
0
def DCH(Ps=None):
    """Delete Ps characters at cursor."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="P")
示例#11
0
def DA2(Ps=None):
    """Request secondary device attributes."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, prefix='>', final="c")
示例#12
0
def DA(Ps=None):
    """Request primary device attributes."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="c")
示例#13
0
def CUU(Ps=None):
    """Cursor up Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="A")
示例#14
0
def CUF(Ps=None):
    """Cursor right Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="C")
示例#15
0
def CUD(Ps=None):
    """Cursor down Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="B")
示例#16
0
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")
示例#17
0
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="`")
示例#18
0
def DECIC(Pn=None):
    """Insert column at cursor."""
    if Pn is not None:
        params = [Pn]
    else:
        params = []
    escio.WriteCSI(params=params, intermediate="'", final="}")
示例#19
0
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="@")
示例#20
0
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="}")
示例#21
0
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")
示例#22
0
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")
示例#23
0
def SM(Pm=None):
    """Set mode."""
    if Pm is None:
        params = []
    else:
        params = [Pm]
    escio.WriteCSI(params=params, final="h")
示例#24
0
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")
示例#25
0
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")
示例#26
0
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")
示例#27
0
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")
示例#28
0
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")
示例#29
0
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")
示例#30
0
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")