[Tutor] subprocess.Popen() OR subprocess.call() ?
Alan Gauld
alan.gauld at btinternet.com
Mon Jun 13 01:22:18 CEST 2011
"Neha P" <mywrkid at yahoo.com> wrote
> I am newbie and want to know what is the difference
> between subprocess.Popen() and subprocess.call() ?
Simply speaking, call() is a way to make subprocess
easier to use. Popen gives you much more powerful
options but that flexibility means it's harder to use.
> when is it best to use each one?
Use the simplest option that works for you. Start
with call and if it can't do the job switch to Popen.
HTH,
More information about the Tutor
mailing list