self.update( eval("%s()" % each.replace('-','_')) ) # avoid getting duplicated files. libz = {} def sourceLibs( jconfig ): if os.path.exists( jconfig ): for each in glob.glob("%s/*.py" % jconfig): libz[ os.path.basename( each ) ] = each # go over the folder structure, and overwrite the files before sourcing then. sourceLibs( "%s/config/libs" % roots.tools() ) if pipe.admin: if pipe.admin.job.current(): sourceLibs( pipe.admin.job().path("/tools/config/libs") ) if pipe.admin.job.shot.current(): sourceLibs( pipe.admin.job.shot().path("/tools/config/libs") ) sourceLibs( pipe.admin.job.shot.user().path("/tools/config/libs") ) # now we source our files!! for each in libz.keys(): # print appz[each] try: exec(''.join(open(libz[each]).readlines()),globals(),locals()) except: print bcolors.FAIL+'='*80
from pipe.base import roots from pipe.libs import allLibs from pipe.bcolors import bcolors import os, glob import traceback # avoid getting duplicated files. appz = {} def sourceApps( jconfig ): if os.path.exists( jconfig ): for each in glob.glob("%s/*.py" % jconfig): appz[ os.path.basename( each ) ] = each # go over the folder structure, and overwrite the files before sourcing then. sourceApps( "%s/config/apps" % roots.tools() ) if pipe.admin: if pipe.admin.job.current(): sourceApps( pipe.admin.job().path("/tools/config/apps") ) if pipe.admin.job.shot.current(): sourceApps( pipe.admin.job.shot().path("/tools/config/apps") ) sourceApps( pipe.admin.job.shot.user().path("/tools/config/apps") ) # now we source our files!! for each in appz.keys(): # print appz[each] try: exec(''.join(open(appz[each]).readlines()),globals(),locals()) except: print bcolors.FAIL+'='*80