Subprocess Library

Download python eBook

Syntax

  • subprocess.call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
  • subprocess.Popen(args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=())

Parameters

ParameterDetails
argsA single executable, or sequence of executable and arguments - 'ls', ['ls', '-la']
shellRun under a shell? The default shell to /bin/sh on POSIX.
cwdWorking directory of the child process.

Related Examples

Stats

139 Contributors: 6
Thursday, December 22, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook