[Python-Dev] test_pep277 vs Win98

Mark Hammond mhammond@skippinet.com.au
Sun, 6 Oct 2002 11:19:24 +1000


Me:
> > * Added os._get_windows_version() as an alias for the Win32 GetVersion()
> > function.

Martin:
> I would like this approach, although I'm uncertain why the function
> name needs to start with an underscore (for that matter, I also wonder
> why _winreg starts with an underscore).

Actually, _winreg was named that was because there was some debate over a
higher level interface to the registry.  There wasn't general agreement on
the API, but there was agreement we could check-in a low-level "_winreg"
implementation, leaving "winreg" for some presumably PEP-designed interface.

> os.windows_version() sounds good to me, although I could also accept
> os.get_windows_version(). Even os.version might work.

And Tim later:

> I agree that would be (very) useful to have, but also agree with your
> unstated but fiercly held belief that it's a hacky solution to the
> immediate problem at hand <wink>.

Well spotted!  However, pragmatism generally gets in the way <wink/frown>.
I've opted for sys.getwindowsversion() - see http://www.python.org/sf/619108

Mark.