[Python-Dev] Recommended way to tell platform

Michael Hudson mwh at python.net
Sat Aug 7 20:40:46 CEST 2004


Tim Peters <tim.peters at gmail.com> writes:

> OTOH, I have no idea when or why sys.platform == "win32" would give a
> different result than os.name == "nt".

Probably never, but os.name == 'posix' covers a huge variety of sins,
so which one you test affects the 'feel' of the code somewhat.

Cheers,
mwh

-- 
  We did requirements and task analysis, iterative design, and user
  testing. You'd almost think programming languages were an interface
  between people and computers.                    -- Steven Pemberton
          (one of the designers of Python's direct ancestor ABC)


More information about the Python-Dev mailing list