diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-04-24 13:46:00 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-04-24 13:46:00 +0200 |
commit | ee722d4a14224e2331a8b7e44af0e5f6755c0c03 (patch) | |
tree | 842830be64109f3161609ce2f699e01d8d15788a /README.rst | |
parent | a2e36c9b7b6eecfefc204f1368033b7c22c9e219 (diff) | |
download | psutil-ee722d4a14224e2331a8b7e44af0e5f6755c0c03.tar.gz |
update README
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -395,6 +395,21 @@ Further process APIs >>> gone, alive = psutil.wait_procs(procs_list, timeout=3, callback=on_terminate) >>> +Popen wrapper: + + >>> import psutil + >>> from subprocess import PIPE + >>> p = psutil.Popen(["/usr/bin/python", "-c", "print('hello')"], stdout=PIPE) + >>> p.name() + 'python' + >>> p.username() + 'giampaolo' + >>> p.communicate() + ('hello\n', None) + >>> p.wait(timeout=2) + 0 + >>> + Windows services ================ |