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

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
check a bunch of putative environment names for legality,
returns a list of bad names (empty implies success).

        def check_varnames( env ):
    """ check a bunch of putative environment names for legality,
    returns a list of bad names (empty implies success)."""
    bad = []
    for varname in env:
        if not re.match( '^[a-zA-Z_][\w]*$', varname ):
            bad.append(varname)
    return bad
        


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
             res = []
             if 'environment' in self.cfg['runtime'][label]:
                 res = check_varnames( self.cfg['runtime'][label]['environment'] )
             if res:
                 bad[label] = res