Lines Matching refs:Popen
34 underlying :class:`Popen` interface can be used directly.
51 same as that of the :class:`Popen` constructor - most of the arguments to
56 When used, the internal :class:`Popen` object is automatically created with
60 The *timeout* argument is passed to :meth:`Popen.communicate`. If the timeout
65 The *input* argument is passed to :meth:`Popen.communicate` and thus to the
68 used, the internal :class:`Popen` object is automatically created with
85 to :class:`Popen`.
153 to :class:`Popen` and indicates that the special file :data:`os.devnull`
162 to :class:`Popen` and indicates that a pipe to the standard stream should be
163 opened. Most useful with :meth:`Popen.communicate`.
168 Special value that can be used as the *stderr* argument to :class:`Popen` and
249 To support a wide variety of use cases, the :class:`Popen` constructor (and
299 The newlines attribute of the file objects :attr:`Popen.stdin`,
300 :attr:`Popen.stdout` and :attr:`Popen.stderr` are not updated by
301 the :meth:`Popen.communicate` method.
324 detail in the :class:`Popen` constructor documentation.
327 Popen Constructor
331 the :class:`Popen` class. It offers a lot of flexibility so that developers
336 .. class:: Popen(args, bufsize=-1, executable=None, stdin=None, stdout=None, \
346 :class:`Popen` are as follows.
370 >>> p = subprocess.Popen(args) # Success!
393 itself. That is to say, :class:`Popen` does the equivalent of::
395 Popen(['/bin/sh', '-c', args[0], args[1], ...])
556 Popen objects are supported as context managers via the :keyword:`with` statement:
560 with Popen(["ifconfig"], stdout=PIPE) as proc:
567 Popen destructor now emits a :exc:`ResourceWarning` warning if the child
581 A :exc:`ValueError` will be raised if :class:`Popen` is called with invalid
589 :func:`call` and :meth:`Popen.communicate` will raise :exc:`TimeoutExpired` if
615 Popen Objects
618 Instances of the :class:`Popen` class have the following methods:
621 .. method:: Popen.poll()
624 :attr:`~Popen.returncode` attribute. Otherwise, returns ``None``.
627 .. method:: Popen.wait(timeout=None)
630 :attr:`~Popen.returncode` attribute.
641 Use :meth:`Popen.communicate` when using pipes to avoid that.
652 .. method:: Popen.communicate(input=None, timeout=None)
665 the Popen object with ``stdin=PIPE``. Similarly, to get anything other than
677 proc = subprocess.Popen(...)
693 .. method:: Popen.send_signal(signal)
704 .. method:: Popen.terminate()
711 .. method:: Popen.kill()
719 .. attribute:: Popen.args
721 The *args* argument as it was passed to :class:`Popen` -- a
726 .. attribute:: Popen.stdin
735 .. attribute:: Popen.stdout
745 .. attribute:: Popen.stderr
756 Use :meth:`~Popen.communicate` rather than :attr:`.stdin.write <Popen.stdin>`,
757 :attr:`.stdout.read <Popen.stdout>` or :attr:`.stderr.read <Popen.stderr>` to avoid
762 .. attribute:: Popen.pid
770 .. attribute:: Popen.returncode
780 Windows Popen Helpers
791 structure is used for :class:`Popen` creation. The following attributes can
835 :class:`Popen` is called with ``shell=True``.
850 :func:`os.set_handle_inheritable` when passed to the :class:`Popen`
907 A :class:`Popen` ``creationflags`` parameter to specify that a new process
915 A :class:`Popen` ``creationflags`` parameter to specify that a new process
922 A :class:`Popen` ``creationflags`` parameter to specify that a new process
929 A :class:`Popen` ``creationflags`` parameter to specify that a new process
936 A :class:`Popen` ``creationflags`` parameter to specify that a new process
943 A :class:`Popen` ``creationflags`` parameter to specify that a new process
950 A :class:`Popen` ``creationflags`` parameter to specify that a new process
961 A :class:`Popen` ``creationflags`` parameter to specify that a new process
968 A :class:`Popen` ``creationflags`` parameter to specify that a new process
976 A :class:`Popen` ``creationflags`` parameter to specify that a new process
986 A :class:`Popen` ``creationflags`` parameter to specify that a new process
1003 return the :attr:`~Popen.returncode` attribute.
1013 same as that of the :class:`Popen` constructor - this function passes all
1041 same as that of the :class:`Popen` constructor - this function passes all
1149 p1 = Popen(["dmesg"], stdout=PIPE)
1150 p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
1201 pid = Popen(["/bin/mycmd", "myarg"]).pid
1213 Popen([path] + args[1:])
1219 Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"})
1230 p = Popen(cmd, shell=True, bufsize=bufsize,
1240 p = Popen(cmd, shell=True, bufsize=bufsize,
1250 p = Popen(cmd, shell=True, bufsize=bufsize,
1262 process = Popen(cmd, stdin=PIPE)
1281 p = Popen("somestring", shell=True, bufsize=bufsize,
1289 p = Popen(["mycmd", "myarg"], bufsize=bufsize,
1294 :class:`subprocess.Popen`, except that:
1296 * :class:`Popen` raises an exception if the execution fails.
1303 ``close_fds=True`` with :class:`Popen` to guarantee this behavior on
1319 Execute the string *cmd* in a shell with :meth:`Popen.check_output` and
1343 :attr:`~Popen.returncode`.