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

Michael Foord fuzzyman at voidspace.org.uk
Tue Mar 5 12:07:52 CET 2013

On 5 Mar 2013, at 05:39, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Mon, Mar 4, 2013 at 4:39 PM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
>> On 1 Mar 2013, at 18:38, Antoine Pitrou <solipsis at pitrou.net> wrote:
>>> On Fri, 1 Mar 2013 09:32:23 -0500
>>> Barry Warsaw <barry at python.org> wrote:
>>>>> On the other hand in some ways Jython is sort of like Python on a
>>>>> weird virtual OS that lets the real OS bleed through some. This may
>>>>> still need to be checked in that way (there's are still checks of <if
>>>>> os.name == 'nt'> right?)
>>>> Yeah, but that all ooooold code ;)
>>> Hmm, what do you mean? `os.name == 'nt'` is still the proper way to
>>> test that we're running on a Windows system (more accurately, over the
>>> Windows API).
>> It has been used incorrectly in a few places in the Python standard library - Windows support code that would work correctly on IronPython is skipped because os.name is *not* 'nt' on IronPython.  That was the case in the past anyway. It's quite some time since I've used IronPython now.
> 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.

Ah, I'm sure you're correct. 


> - Jeff


May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing 

More information about the Python-Dev mailing list