Difference between revisions of "Python library: subprocess"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
[[import]] subprocess as sp | [[import]] subprocess as sp | ||
output = sp.getoutput('[[whoami --version]]') | output = sp.getoutput('[[whoami --version]]') | ||
− | print (output) | + | [[print]] (output) |
== Related == | == Related == | ||
* <code>[[import os]]</code> | * <code>[[import os]]</code> | ||
− | * <code>os.system("[[uptime]]")</code> | + | * <code>[[os.system]]("[[uptime]]")</code> |
+ | * <code>[[subprocess.run]]</code> | ||
== See also == | == See also == | ||
+ | * {{subprocess}} | ||
* {{Python}} | * {{Python}} | ||
[[Category:Python]] | [[Category:Python]] |
Latest revision as of 10:32, 8 November 2024
https://docs.python.org/3/library/subprocess.html
import subprocess as sp output = sp.getoutput('whoami --version') print (output)
Related[edit]
See also[edit]
- subprocess
- Python, PIP, GIL, Flask, Django, Marshmallow,
def
, logging, Pandas, Numpy, AWS Chalice,import
,from
,tuple
,list
, Python exceptions,virtualenv
,.append
,pytz
,TZ
,print
,python3 -c
,os
, PEP, Python Institute, Methods: Dunder methods, Flake8, Python collections, Function decorators in Python, Click python library, Python module, Flower,kwargs
, Black (Python), Python list structure, Mypy,variables
, Casting,try:
, pydoc, argparse, Anaconda,pyenv, setup.py, python3 --version, python3 --help
, Data Classes, raise
Advertising: