diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-10-17 20:08:06 +0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-10-17 20:08:06 +0800 |
commit | ad0f2d200e2d0bb061bf20045126bf8aa87d289e (patch) | |
tree | f1856bdcbb778c3e352eec2623e4bf098c9535f6 | |
parent | 63fcc0e3a5c5bc155970d40df99acfac4a3aa0de (diff) | |
download | psutil-ad0f2d200e2d0bb061bf20045126bf8aa87d289e.tar.gz |
update doc
-rw-r--r-- | docs/index.rst | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/index.rst b/docs/index.rst index e5e40737..dd83c6b9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1299,13 +1299,15 @@ Process class Here's an example on how to set the highest I/O priority depending on what platform you're on:: - import psutil - p = psutil.Process() - if psutil.LINUX - p.ionice(psutil.IOPRIO_CLASS_RT, value=7) - else: # Windows - p.ionice(psutil.IOPRIO_HIGH) - p.ionice() # get + >>> import psutil + >>> p = psutil.Process() + >>> if psutil.LINUX: + ... p.ionice(psutil.IOPRIO_CLASS_RT, value=7) + ... else: + ... p.ionice(psutil.IOPRIO_HIGH) + ... + >>> p.ionice() # get + pionice(ioclass=<IOPriority.IOPRIO_CLASS_RT: 1>, value=7) Availability: Linux, Windows Vista+ |