コード例 #1
0
def show_menu():
    cc.v('')
    cc.v('=========================================================')
    for o in range(len(options)):
        if options[o] is None:
            cc.v('  -------------------------------------------------------')
            continue
        cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, '%2d' % options[o]['id']),
             (cc.CR_NORMAL, '] ', options[o]['disp']))

    cc.v('  -------------------------------------------------------')
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' E'),
         (cc.CR_NORMAL, '] clean external temp. files.'))
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' C'),
         (cc.CR_NORMAL, '] clean build and dist.'))
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' A'),
         (cc.CR_NORMAL, '] clean everything.'))

    cc.v('  -------------------------------------------------------')
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' Q'), (cc.CR_NORMAL, '] exit'))

    cc.w('\nselect action: ', end='')
    try:
        x = _input()
    except EOFError:
        x = 'q'

    cc.n('')
    return x.lower()
コード例 #2
0
def show_menu():
    cc.v('\n=====================[ MENU ]===============================')
    for o in options:
        if o['id'] == '--SPLIT-LINE--':
            if o['title'] is not None:
                cc.w('\n  {}:'.format(o['title']))
            else:
                cc.v('\n  ----------------------------------------------------------')
            continue

        cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, '%2d' % o['id']), (cc.CR_NORMAL, '] ', o['disp']))

    cc.v('\n  ----------------------------------------------------------')
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' Q'), (cc.CR_NORMAL, '] exit'))

    cc.w('\nselect action: ', end='')
    try:
        x = input()
    except EOFError:
        x = 'q'

    cc.n('')
    return x.lower()
コード例 #3
0
ファイル: build.py プロジェクト: eomsoft/teleport
def show_menu():
    cc.v('')
    cc.v('=========================================================')
    for o in range(len(options)):
        if options[o] is None:
            cc.v('  -------------------------------------------------------')
            continue
        cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, '%2d' % options[o]['id']), (cc.CR_NORMAL, '] ', options[o]['disp']))

    cc.v('  -------------------------------------------------------')
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' C'), (cc.CR_NORMAL, '] clean build and dist.'))
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' A'), (cc.CR_NORMAL, '] clean everything.'))

    cc.v('  -------------------------------------------------------')
    cc.o((cc.CR_NORMAL, '  ['), (cc.CR_INFO, ' Q'), (cc.CR_NORMAL, '] exit'))

    cc.w('\nselect action: ', end='')
    try:
        x = _input()
    except EOFError:
        x = 'q'

    cc.n('')
    return x.lower()