diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-10-29 03:18:46 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-10-29 03:18:46 +0200 |
commit | d262c71b006c6202bcdc48f96c3d23a1578853fc (patch) | |
tree | 158f10d6941f9c93ae2e05495382e6c9519474b8 | |
parent | d4a07172e41bcba258dcc1a4d1f6d7cf67a5400c (diff) | |
parent | 71282dfa1e11b55d3995d5588e475754581c3980 (diff) | |
download | psutil-d262c71b006c6202bcdc48f96c3d23a1578853fc.tar.gz |
Merge branch 'master' into oneshot
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | docs/index.rst | 43 |
2 files changed, 25 insertions, 22 deletions
@@ -35,7 +35,7 @@ all: test # Remove all build files. clean: - rm -rf `find . -type d -name __pycache__ + rm -rf `find . -type d -name __pycache__ \ -o -type f -name \*.bak \ -o -type f -name \*.orig \ -o -type f -name \*.pyc \ @@ -43,7 +43,7 @@ clean: -o -type f -name \*.pyo \ -o -type f -name \*.rej \ -o -type f -name \*.so \ - -o -type f -name \*.~ + -o -type f -name \*.~ \ -o -type f -name \*\$testfn` rm -rf \ *.core \ diff --git a/docs/index.rst b/docs/index.rst index 43ff77a6..cf50a459 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -504,23 +504,16 @@ Network value is a list of namedtuples for each address assigned to the NIC. Each namedtuple includes 5 fields: - - **family** - - **address** - - **netmask** - - **broadcast** - - **ptp** - - *family* can be either - `AF_INET <http://docs.python.org//library/socket.html#socket.AF_INET>`__, - `AF_INET6 <http://docs.python.org//library/socket.html#socket.AF_INET6>`__ - or :const:`psutil.AF_LINK`, which refers to a MAC address. - *address* is the primary address and it is always set. - *netmask*, *broadcast* and *ptp* may be ``None``. - *ptp* stands for "point to point" and references the destination address on a - point to point interface (typically a VPN). - *broadcast* and *ptp* are mutually exclusive. - *netmask*, *broadcast* and *ptp* are not supported on Windows and are set to - ``None``. + - **family**: the address family, either + `AF_INET <http://docs.python.org//library/socket.html#socket.AF_INET>`__, + `AF_INET6 <http://docs.python.org//library/socket.html#socket.AF_INET6>`__ + or :const:`psutil.AF_LINK`, which refers to a MAC address. + - **address**: the primary NIC address (always set). + - **netmask**: the netmask address (may be ``None``). + - **broadcast**: the broadcast address (may be ``None``). + - **ptp**: stands for "point to point"; it's the destination address on a + point to point interface (typically a VPN). *broadcast* and *ptp* are + mutually exclusive. May be ``None``. Example:: @@ -548,14 +541,14 @@ Network interface (that's why dict values are lists). .. note:: - *netmask*, *broadcast* and *ptp* are not supported on Windows and are set - to ``None``. + *broadcast* and *ptp* are not supported on Windows and are always ``None``. .. versionadded:: 3.0.0 .. versionchanged:: 3.2.0 *ptp* field was added. - .. versionchanged:: 4.4.0 *netmask* field on Windows is no longer ``None``. + .. versionchanged:: 4.4.0 added support for *netmask* field on Windows which + is no longer ``None``. .. function:: net_if_stats() @@ -1904,6 +1897,16 @@ Constants .. versionadded:: 3.0.0 +.. _const-version-info: +.. data:: version_info + + A tuple to check psutil installed version. Example: + + >>> import psutil + >>> if psutil.version_info >= (4, 5): + ... pass + + Development guide ================= |