Small wrapper to call CMT.
Definition at line 252 of file GaudiTest.py.
def GaudiTest.CMT.__init__ |
( |
|
self, |
|
|
|
path = None |
|
) |
| |
def GaudiTest.CMT.__getattr__ |
( |
|
self, |
|
|
|
attr |
|
) |
| |
Definition at line 278 of file GaudiTest.py.
279 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 261 of file GaudiTest.py.
263 if type(args)
is str:
265 cmd =
"cmt %s" % command
273 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 281 of file GaudiTest.py.
282 """Returns a dictionary containing the runtime environment produced by CMT. 283 If a dictionary is passed a modified instance of it is returned. 287 for l
in self.setup(
"-csh").splitlines():
289 if l.startswith(
"setenv"):
290 dummy, name, value = l.split(
None, 3)
291 env[name] = value.strip(
'"')
292 elif l.startswith(
"unsetenv"):
293 dummy, name = l.split(
None, 2)
def runtime_env(self, env=None)
def GaudiTest.CMT.show_macro |
( |
|
self, |
|
|
|
k |
|
) |
| |
Definition at line 298 of file GaudiTest.py.
299 r = self.show([
"macro", k])
300 if r.find(
"CMT> Error: symbol not found") >= 0:
303 return self.show([
"macro_value", k]).strip()
The documentation for this class was generated from the following file: