예제 #1
0
def all_launches(kdict={}):
    import pyina.launchers as launchers, traceback, os.path
    stack = traceback.extract_stack()
    caller = stack[-min(len(stack), 2)][0]
    #
    defaults['program'] = caller
    defaults['progname'] = os.path.basename(caller)
    #
    for key in defaults.keys():
        if key not in kdict:
            kdict[key] = defaults[key]
    L = all_launchers()
    #
    str = []
    for launcher in L:
        str.append(eval('%s(kdict)' % (launcher)))
        str.append('')
    return '\n'.join(str)
예제 #2
0
파일: launchers.py 프로젝트: hpparvi/pyina
def all_launches(kdict = {}):
    import launchers, traceback, os.path
    stack = traceback.extract_stack()
    caller = stack[ -min(len(stack),2) ][0]
    #
    defaults['program'] = caller
    defaults['progname'] = os.path.basename(caller)
    #
    for key in defaults.keys():
        if not kdict.has_key(key):
            kdict[key] = defaults[key]
    L = all_launchers()
    #
    str = []
    for launcher in L:
        str.append(eval('%s(kdict)' % (launcher)))
        str.append('')
    return '\n'.join(str)