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