Lines Matching refs:shell
5 """A wrapper for subprocess to make calling shell commands easier."""
23 def Popen(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
26 shell=shell, close_fds=True, env=env,
30 def Call(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
31 pipe = Popen(args, stdout=stdout, stderr=stderr, shell=shell, cwd=cwd,
53 def GetCmdOutput(args, cwd=None, shell=False):
61 shell: Whether to execute args as a shell command.
67 (_, output) = GetCmdStatusAndOutput(args, cwd, shell)
71 def GetCmdStatusAndOutput(args, cwd=None, shell=False):
79 shell: Whether to execute args as a shell command.
86 if not shell:
87 raise Exception('string args must be run with shell=True')
88 elif shell:
89 raise Exception('array args must be run with shell=False')
99 shell=shell, cwd=cwd)
115 def GetCmdStatusAndOutputWithTimeout(args, timeout, cwd=None, shell=False,
125 shell: Whether to execute args as a shell command.
133 process = Popen(args, cwd=cwd, shell=shell, stdout=subprocess.PIPE,