[issue1180267] expanding platform module and making it work as it should

Marc-Andre Lemburg report at bugs.python.org
Mon Aug 2 11:22:04 CEST 2010


Marc-Andre Lemburg <mal at egenix.com> added the comment:

You appear to be requesting two things:

 1. Determine the Windows version by looking at sys.getwindowsversion() rather than relying on the ver command line tool.

 2. Use lsb_release to fetch the release name on Linux systems that support it.

The first is possible, if that API is available. It would still have to fall back to the ver command line tool, since it's not future-proof, i.e. future versions of Windows will not automatically be supported.

The second is wrong, since platform.release() is only a short-cut to the uname() function and this refers to the underlying system rather than the Linux distrubtion.

However, I could add support for lsb_release to the linux_distribution() function.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1180267>
_______________________________________


More information about the Python-bugs-list mailing list