[stdlib-sig] platform as part of sys (was pypy_vm)

Jim Jewett jimjjewett at gmail.com
Wed Apr 9 20:43:13 CEST 2008


"M.-A. Lemburg" <mal at egenix.com> wrote:
>  > Le mardi 08 avril 2008 ? 13:42 -0400, Jim Jewett a ?crit :
>  >> If important information is in the interpreter-specific location, it
>  >> would be nice to know where that is.  That could be a specific module
>  >> name, but a module-name-pattern might be enough.

...

>  We already have a way to identify the Python implementation and
>  it works for CPython, IronPython and Jython:

>   >>> import platform
>   >>> platform.python_implementation()
>  'CPython'

Great, assuming that the capitalization is still OK for a module name.

But looking through platform convinced me that it really ought be part
of the sys reorg.  And it provides at least one pattern for dealing
with stuff that doesn't make sense in some interpreter environments.

For example, platform.dist() is defined as returning which *Linux*
distribution is used.  So on windows, the tuple contains empty
strings.  (Though I'm not sure why the libc_ver is also returning
blanks.)

-jJ


More information about the stdlib-sig mailing list