コード例 #1
0
def has_key(ch):
    if type(ch) == type(''): ch = ord(ch)

    # Figure out the correct capability name for the keycode.
    capability_name = _capability_names[ch]

    #Check the current terminal description for that capability;
    #if present, return true, else return false.
    if _curses.tigetstr(capability_name): return 1
    else: return 0
コード例 #2
0
ファイル: has_key.py プロジェクト: Claruarius/stblinux-2.6.37
def has_key(ch):
    if type(ch) == type( '' ): ch = ord(ch)

    # Figure out the correct capability name for the keycode.
    capability_name = _capability_names[ch]

    #Check the current terminal description for that capability;
    #if present, return true, else return false.
    if _curses.tigetstr( capability_name ): return 1
    else: return 0
コード例 #3
0
ファイル: has_key.py プロジェクト: webiumsk/WOT-0.9.12
def has_key(ch):
    if isinstance(ch, str):
        ch = ord(ch)
    capability_name = _capability_names.get(ch)
    if capability_name is None:
        return False
    elif _curses.tigetstr(capability_name):
        return True
    else:
        return False
        return
コード例 #4
0
def has_key(ch):
    if isinstance(ch, str):
        ch = ord(ch)
    capability_name = _capability_names.get(ch)
    if capability_name is None:
        return False
    else:
        if _curses.tigetstr(capability_name):
            return True
        return False
        return
コード例 #5
0
ファイル: has_key.py プロジェクト: 24678/ds_mod_tools
def has_key(ch):
    if isinstance(ch, str):
        ch = ord(ch)

    # Figure out the correct capability name for the keycode.
    capability_name = _capability_names.get(ch)
    if capability_name is None:
        return False

    #Check the current terminal description for that capability;
    #if present, return true, else return false.
    if _curses.tigetstr( capability_name ):
        return True
    else:
        return False
コード例 #6
0
def has_key(ch):
    if isinstance(ch, str):
        ch = ord(ch)

    # Figure out the correct capability name for the keycode.
    capability_name = _capability_names.get(ch)
    if capability_name is None:
        return False

    #Check the current terminal description for that capability;
    #if present, return true, else return false.
    if _curses.tigetstr(capability_name):
        return True
    else:
        return False
コード例 #7
0
ファイル: interp_curses.py プロジェクト: TheDunn/flex-pypy
def _curses_tigetstr(capname):
    # NOT_RPYTHON
    try:
        res = _curses.tigetstr(capname)
    except _curses.error, e:
        raise curses_error(e.args[0])
コード例 #8
0
ファイル: interp_curses.py プロジェクト: griels/pypy-sc
def _curses_tigetstr(capname):
    # NOT_RPYTHON
    try:
        res = _curses.tigetstr(capname)
    except _curses.error, e:
        raise curses_error(e.args[0])