Home | Trees | Indices | Help |
---|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
exceptions = getConfig('Shell') ['IgnoredVars']
|
|
The setup script is sourced (with possible arguments) and the environment is captured. The environment variables are expanded automatically (this is a fix for bug #44259: GangaLHCb tests fail due to gridProxy check). Example of variable expansion: os.environ['BAR'] = 'rabarbar' os.environ['FOO'] = '$BAR' s = Shell() # with or without the setup script assert s.env['FOO'] == 'rabarbar' # NOT literal string '$BAR' NOTE: the behaviour is not 100% bash compatible: undefined variables in bash are empty strings, Shell() leaves the literals unchanged,so: os.environ['FOO'] = '$NO_BAR' s = Shell() if os.environ.not has_key('NO_BAR'): assert s.env['FOO'] == '$NO_BAR' |
Execute on OS command. Useful for interactive commands. Stdout and Stderr are not caputured and are passed on the caller. stderr_capture may specify a name of a file to which stderr is redirected. |
Write wrapper script for command A wrapper around cmd is written including the setting of the environment. Useful for situations where it is an external Python module that is calling the command. It is callers responsibility to enter new location into PATH as this might have external effects. Full path of wrapper script is returned. Preexecute can contain extra commands to be executed before cmd fullpath = s.wrapper('lcg-cp', 'echo lcg-cp called with arguments $*' |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Jun 25 10:35:22 2012 | http://epydoc.sourceforge.net |