Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def expandvars( item, owner=None ):
    if owner:
        homedir = os.path.expanduser( '~' + owner )
        homedir = os.environ[ 'HOME' ]
    # first replace '$HOME' with actual home dir
    item = item.replace( '$HOME', homedir )
    # now expand any other environment variable or tilde-username
    item = os.path.expandvars( os.path.expanduser( item ))
    return item

src/c/y/cylc-HEAD/lib/cylc/config.py   cylc(Download)
import taskdef
from cylc.cfgspec.suite import get_suitecfg
from envvar import check_varnames, expandvars
from copy import deepcopy, copy
from cycle_time import ct, CycleTimeError
    def process_directories(self):
        os.environ['CYLC_SUITE_NAME'] = self.suite
        os.environ['CYLC_SUITE_REG_PATH'] = RegPath( self.suite ).get_fpath()
        os.environ['CYLC_SUITE_DEF_PATH'] = self.fdir
        self.cfg['visualization']['runtime graph']['directory'] = expandvars( self.cfg['visualization']['runtime graph']['directory'], self.owner)