[Python-Dev] Hey! who changed sys.platform?!

M.-A. Lemburg mal@lemburg.com
Sat, 01 Jul 2000 13:56:44 +0200

Guido van Rossum wrote:
> > Not that I hope to override the heavy -1, but I don't agree with the second
> > point.  It embodies a huge amount of knowledge that is needed to write
> > portable code.  As such, IMO, it _does_ belong in the standard library.  How
> > is it different in its nature from sys.platform, which is only a much weaker
> > version of the same concept?
> A more subtle way of stating my opinion could be: if we were to do
> something in the standard distribution about the problems that this is
> addressing, I think we would do it in a much more direct fashion,
> e.g. by making the appropriate enquiry functions directly accessible.

platform.py does use the available functions on a couple
of platforms... and it itself provides direct enquiry functions
for Python programs to use. Perhaps I'm misunderstanding you

Anyway, it's there for non-core programs to use and so far
I think the core lib has managed to switch on sys.platform
and do the right thing, so platform.py may not be all that
necessary in the core.

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/