def findPyFiles():
    pyPublic = data.dcoreRoot()

    #print('Getting files from: ' + pyPublic)

    pyfiles = fsearch.getAllFilesRecursively('*.py', pyPublic)
    pyfiles = [pyfile for pyfile in pyfiles if isOK(pyfile)]

    return pyfiles
Exemple #2
0
def findExecutableScripts():
    pyPublic = data.dcoreRoot()
    pyfiles = fsearch.getAllFilesRecursively('*.py', pyPublic)

    tag = scripts_info.shell_meta_search

    of = []
    for pfile in pyfiles:
        lines = open(pfile).readlines()

        for l in lines:
            if tag in l:
                stag = l.split('=')[1].strip()
                if len(stag) > 1: stag = stag.split(' ')[0]
                stag = stag.strip('"')
                stag = stag.strip("'")
                of.append((pfile,stag))
                break

    return of