STINNER Victor <victor.stin...@haypocalc.com> added the comment: Something like:
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -699,20 +699,21 @@ always available. This string contains a platform identifier that can be used to append platform-specific components to :data:`sys.path`, for instance. - For Unix systems, this is the lowercased OS name as returned by ``uname -s`` - with the first part of the version as returned by ``uname -r`` appended, - e.g. ``'sunos5'`` or ``'linux2'``, *at the time when Python was built*. - Unless you want to test for a specific system version, it is therefore - recommended to use the following idiom:: + For Unix systems, except on Linux, this is the lowercased OS name as + returned by ``uname -s`` with the first part of the version as returned by + ``uname -r`` appended, e.g. ``'sunos5'`` or ``'linux2'``, *at the time when + Python was built*. Unless you want to test for a specific system version, + it is therefore recommended to use the following idiom:: - if sys.platform.startswith('linux'): - # Linux-specific code here... + if sys.platform.startswith('freebsd'): + # Freebsd-specific code here... For other systems, the values are: ================ =========================== System :data:`platform` value ================ =========================== + Linux ``'linux2'`` Windows ``'win32'`` Windows/Cygwin ``'cygwin'`` Mac OS X ``'darwin'`` ? I don't think that I need a :versionchanged:`2.7.3`. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12326> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com