• Home
  • Raw
  • Download

Lines Matching full:shell

39                   capture_output=False, shell=False, cwd=None, timeout=None, \
94 >>> subprocess.run("exit 1", shell=True, check=True)
116 Changed Windows shell search order for ``shell=True``. The current
275 a single string, either *shell* must be :const:`True` (see below) or else
321 If *shell* is ``True``, the specified command will be executed through
322 the shell. This can be useful if you are using Python primarily for the
324 convenient access to other shell features such as shell pipes, filename
327 implementations of many shell-like features (in particular, :mod:`glob`,
339 Read the `Security Considerations`_ section before using ``shell=True``.
355 stderr=None, preexec_fn=None, close_fds=True, shell=False, \
372 platform-dependent and described below. See the *shell* and *executable*
391 executable path with ``shell=False``, *cwd* does not override the
406 It may not be obvious how to break a shell command into a sequence of arguments,
419 as *eggs.txt*) that are separated by whitespace in the shell go in separate
421 used in the shell (such as filenames containing spaces or the *echo* command
429 *args* parameter accepts a :term:`path-like object` if *shell* is
433 *args* parameter accepts a :term:`path-like object` if *shell* is
437 The *shell* argument (which defaults to ``False``) specifies whether to use
438 the shell as the program to execute. If *shell* is ``True``, it is
441 On POSIX with ``shell=True``, the shell defaults to :file:`/bin/sh`. If
443 to execute through the shell. This means that the string must be
444 formatted exactly as it would be when typed at the shell prompt. This
447 any additional items will be treated as additional arguments to the shell
452 On Windows with ``shell=True``, the :envvar:`COMSPEC` environment variable
453 specifies the default shell. The only time you need to specify
454 ``shell=True`` on Windows is when the command you wish to execute is built
455 into the shell (e.g. :command:`dir` or :command:`copy`). You do not need
456 ``shell=True`` to run a batch file or console-based executable.
460 Read the `Security Considerations`_ section before using ``shell=True``.
483 is very seldom needed. When ``shell=False``, *executable* replaces the
489 :program:`ps`. If ``shell=True``, on POSIX the *executable* argument
490 specifies a replacement shell for the default :file:`/bin/sh`.
501 Changed Windows shell search order for ``shell=True``. The current
726 :exc:`OSError` exceptions. Note that, when ``shell=True``, :exc:`OSError`
727 will be raised by the child only if the selected shell itself was not found.
728 To determine if the shell failed to find the requested application, it is
753 implicitly call a system shell. This means that all characters,
754 including shell metacharacters, can safely be passed to child processes.
755 If the shell is invoked explicitly, via ``shell=True``, it is the application's
758 `shell injection <https://en.wikipedia.org/wiki/Shell_injection#Shell_injection>`_
918 Note that if you set the *shell* argument to ``True``, this is the process ID
919 of the spawned shell.
990 :class:`Popen` is called with ``shell=True``.
1134 This feature is particularly useful for multithreaded shell applications
1156 shell=False, cwd=None, timeout=None, **other_popen_kwargs)
1184 Changed Windows shell search order for ``shell=True``. The current
1191 shell=False, cwd=None, timeout=None, \
1224 Changed Windows shell search order for ``shell=True``. The current
1231 .. function:: check_output(args, *, stdin=None, stderr=None, shell=False, \
1268 ... shell=True)
1287 Changed Windows shell search order for ``shell=True``. The current
1316 Replacing :program:`/bin/sh` shell command substitution
1327 Replacing shell pipeline
1344 Alternatively, for trusted input, the shell's own pipeline support may still
1353 output = check_output("dmesg | grep hda", shell=True)
1363 retcode = call("mycmd" + " myarg", shell=True)
1367 * Calling the program through the shell is usually not required.
1378 retcode = call("mycmd" + " myarg", shell=True)
1423 p = Popen(cmd, shell=True, bufsize=bufsize,
1433 p = Popen(cmd, shell=True, bufsize=bufsize,
1443 p = Popen(cmd, shell=True, bufsize=bufsize,
1474 p = Popen("somestring", shell=True, bufsize=bufsize,
1500 Legacy Shell Invocation Functions
1504 ``commands`` module. These operations implicitly invoke the system shell and
1510 Return ``(exitcode, output)`` of executing *cmd* in a shell.
1512 Execute the string *cmd* in a shell with :meth:`Popen.check_output` and
1544 Return output (stdout and stderr) of executing *cmd* in a shell.