Beispiel #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')
Beispiel #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")
Beispiel #3
0
def CUB(Ps=None):
    """Cursor left Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="D")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #7
0
def RM(Pm=None):
    """Reset mode."""
    if Pm is None:
        params = []
    else:
        params = [Pm]
    escio.WriteCSI(params=params, final="l")
Beispiel #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")
Beispiel #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="~")
Beispiel #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")
Beispiel #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")
Beispiel #12
0
def DA(Ps=None):
    """Request primary device attributes."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="c")
Beispiel #13
0
def CUU(Ps=None):
    """Cursor up Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="A")
Beispiel #14
0
def CUF(Ps=None):
    """Cursor right Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="C")
Beispiel #15
0
def CUD(Ps=None):
    """Cursor down Ps times."""
    if Ps is None:
        params = []
    else:
        params = [Ps]
    escio.WriteCSI(params=params, final="B")
Beispiel #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")
Beispiel #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="`")
Beispiel #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="}")
Beispiel #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="@")
Beispiel #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="}")
Beispiel #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")
Beispiel #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")
Beispiel #23
0
def SM(Pm=None):
    """Set mode."""
    if Pm is None:
        params = []
    else:
        params = [Pm]
    escio.WriteCSI(params=params, final="h")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")