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