[Python-Dev] Python Language Summit at PyCon: Agenda

fwierzbicki at gmail.com fwierzbicki at gmail.com
Tue Mar 5 17:55:06 CET 2013


On Mon, Mar 4, 2013 at 9:39 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
> I think you misremembered - there's lots of code that uses
> `sys.platform == 'win32'` to detect Windows, but sys.platform is 'cli'
> for IronPython. I'm pretty sure `os.name has always been 'nt' (when
> running on Windows), and if not, it definitely is now.
>
> Jython sets os.name to 'java' (IIRC), so there isn't a uniform way to
> detect Windows across all implementations.
I've been thinking that this is a bit of a historical mistake on our
part. I'm strongly considering setting os.name properly in Jython3.

-Frank


More information about the Python-Dev mailing list