|
Gaudi Framework, version v22r4 |
| Home | Generated: Fri Sep 2 2011 |
Classes | |
| class | LogFormatter |
| class | LogFilter |
| class | ConsoleHandler |
| class | ParserError |
| class | JobOptsParser |
| class | _TempSysPath |
Functions | |
| def | GetConsoleHandler |
| def | InstallRootLoggingHandler |
| def | PrintOn |
| def | PrintOff |
| def | _find_file |
| def | _to_be_included |
| def | _import_python |
| def | _import_pickle |
| def | _import_opts |
| def | importOptions |
| def | importUnits |
| Import a file containing declaration of units. | |
Variables | |
| tuple | _log = logging.getLogger(__name__) |
| _consoleHandler = None | |
| tuple | _included_files = set() |
| tuple | _parser = JobOptsParser() |
| dictionary | _import_function_mapping |
| def ProcessJobOptions::_find_file | ( | f ) | [private] |
Definition at line 107 of file ProcessJobOptions.py.
00108 : 00109 # expand environment variables in the filename 00110 f = os.path.expandvars(f) 00111 if os.path.isfile(f): 00112 return os.path.realpath(f) 00113 00114 path = os.environ.get('JOBOPTSEARCHPATH','').split(os.pathsep) 00115 # find the full path to the option file 00116 candidates = [d for d in path if os.path.isfile(os.path.join(d,f))] 00117 if not candidates: 00118 raise ParserError("Cannot find '%s' in %s" % (f,path)) 00119 return os.path.realpath(os.path.join(candidates[0],f))
| def ProcessJobOptions::_import_opts | ( | file ) | [private] |
Definition at line 386 of file ProcessJobOptions.py.
| def ProcessJobOptions::_import_pickle | ( | file ) | [private] |
Definition at line 380 of file ProcessJobOptions.py.
| def ProcessJobOptions::_import_python | ( | file ) | [private] |
Definition at line 377 of file ProcessJobOptions.py.
| def ProcessJobOptions::_to_be_included | ( | f ) | [private] |
Definition at line 121 of file ProcessJobOptions.py.
| def ProcessJobOptions::GetConsoleHandler | ( | prefix = None, |
|
strm = None |
|||
| ) |
Definition at line 83 of file ProcessJobOptions.py.
| def ProcessJobOptions::importOptions | ( | optsfile ) |
Definition at line 395 of file ProcessJobOptions.py.
00396 : 00397 # expand environment variables before checking the extension 00398 optsfile = os.path.expandvars(optsfile) 00399 # check the file type (extension) 00400 dummy, ext = os.path.splitext(optsfile) 00401 if ext in _import_function_mapping: 00402 # check if the file has been already included 00403 optsfile = _find_file(optsfile) 00404 if _to_be_included(optsfile): 00405 _log.info("--> Including file '%s'", optsfile) 00406 # include the file 00407 _import_function_mapping[ext](optsfile) 00408 _log.info("<-- End of file '%s'", optsfile) 00409 else: 00410 raise ParserError("Unknown file type '%s' ('%s')" % (ext,optsfile))
| def ProcessJobOptions::importUnits | ( | unitsfile ) |
Import a file containing declaration of units.
It is equivalent to:
units "unitsfile.opts"
Definition at line 416 of file ProcessJobOptions.py.
| def ProcessJobOptions::InstallRootLoggingHandler | ( | prefix = None, |
|
level = None, |
|||
strm = None |
|||
| ) |
Definition at line 91 of file ProcessJobOptions.py.
| def ProcessJobOptions::PrintOff | ( | step = 1 ) |
Definition at line 101 of file ProcessJobOptions.py.
| def ProcessJobOptions::PrintOn | ( | step = 1, |
|
force = False |
|||
| ) |
Definition at line 99 of file ProcessJobOptions.py.
Definition at line 82 of file ProcessJobOptions.py.
| dictionary ProcessJobOptions::_import_function_mapping |
00001 { 00002 ".py" : _import_python, 00003 ".pkl" : _import_pickle, 00004 ".opts" : _import_opts, 00005 }
Definition at line 389 of file ProcessJobOptions.py.
| tuple ProcessJobOptions::_included_files = set() |
Definition at line 120 of file ProcessJobOptions.py.
| tuple ProcessJobOptions::_log = logging.getLogger(__name__) |
Definition at line 4 of file ProcessJobOptions.py.
| tuple ProcessJobOptions::_parser = JobOptsParser() |
Definition at line 375 of file ProcessJobOptions.py.