MCPcopy Create free account
hub / github.com/PyWavelets/pywt / _call

Method _call

util/authors.py:174–189  ·  view source on GitHub ↗
(self, command, args, kw, repository=None, call=False)

Source from the content-addressed store, hash-verified

172 self.executable = executable
173
174 def _call(self, command, args, kw, repository=None, call=False):
175 cmd = [self.executable, command] + list(args)
176 cwd = None
177
178 if repository is not None:
179 cwd = os.getcwd()
180 os.chdir(repository)
181
182 try:
183 if call:
184 return subprocess.call(cmd, **kw)
185 else:
186 return subprocess.Popen(cmd, **kw)
187 finally:
188 if cwd is not None:
189 os.chdir(cwd)
190
191 def __call__(self, command, *a, **kw):
192 ret = self._call(command, a, {}, call=True, **kw)

Callers 4

__call__Method · 0.95
pipeMethod · 0.95
readMethod · 0.95
testMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected