Small wrapper to call CMT.
Definition at line 245 of file GaudiTest.py.
def GaudiTest.CMT.__init__ |
( |
|
self, |
|
|
|
path = None |
|
) |
| |
def GaudiTest.CMT.__getattr__ |
( |
|
self, |
|
|
|
attr |
|
) |
| |
Definition at line 271 of file GaudiTest.py.
272 return lambda args=[]: self.
_run_cmt(attr, args)
def _run_cmt(self, command, args)
def __getattr__(self, attr)
def GaudiTest.CMT._run_cmt |
( |
|
self, |
|
|
|
command, |
|
|
|
args |
|
) |
| |
|
private |
Definition at line 254 of file GaudiTest.py.
256 if type(args)
is str:
258 cmd =
"cmt %s" % command
266 result = os.popen4(cmd)[1].
read()
def read(f, regex='.*', skipevents=0)
def _run_cmt(self, command, args)
def GaudiTest.CMT.runtime_env |
( |
|
self, |
|
|
|
env = None |
|
) |
| |
Returns a dictionary containing the runtime environment produced by CMT.
If a dictionary is passed a modified instance of it is returned.
Definition at line 274 of file GaudiTest.py.
275 """Returns a dictionary containing the runtime environment produced by CMT. 276 If a dictionary is passed a modified instance of it is returned. 280 for l
in self.setup(
"-csh").splitlines():
282 if l.startswith(
"setenv"):
283 dummy, name, value = l.split(
None, 3)
284 env[name] = value.strip(
'"')
285 elif l.startswith(
"unsetenv"):
286 dummy, name = l.split(
None, 2)
def runtime_env(self, env=None)
def GaudiTest.CMT.show_macro |
( |
|
self, |
|
|
|
k |
|
) |
| |
Definition at line 291 of file GaudiTest.py.
292 r = self.show([
"macro", k])
293 if r.find(
"CMT> Error: symbol not found") >= 0:
296 return self.show([
"macro_value", k]).strip()
The documentation for this class was generated from the following file: