Small wrapper to call CMT.
Definition at line 234 of file GaudiTest.py.
def GaudiTest.CMT.__init__ |
( |
|
self, |
|
|
|
path = None |
|
) |
| |
def GaudiTest.CMT.__getattr__ |
( |
|
self, |
|
|
|
attr |
|
) |
| |
Definition at line 259 of file GaudiTest.py.
260 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 242 of file GaudiTest.py.
244 if type(args)
is str:
246 cmd =
"cmt %s"%command
254 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 262 of file GaudiTest.py.
263 """Returns a dictionary containing the runtime environment produced by CMT. 264 If a dictionary is passed a modified instance of it is returned. 268 for l
in self.setup(
"-csh").splitlines():
270 if l.startswith(
"setenv"):
271 dummy,name,value = l.split(
None,3)
272 env[name] = value.strip(
'"')
273 elif l.startswith(
"unsetenv"):
274 dummy,name = l.split(
None,2)
def runtime_env(self, env=None)
def GaudiTest.CMT.show_macro |
( |
|
self, |
|
|
|
k |
|
) |
| |
Definition at line 278 of file GaudiTest.py.
279 r = self.show([
"macro",k])
280 if r.find(
"CMT> Error: symbol not found") >= 0:
283 return self.show([
"macro_value",k]).strip()
The documentation for this class was generated from the following file: