On Mon, Mar 4, 2013 at 4:39 PM, Michael Foord email@example.com wrote:
On 1 Mar 2013, at 18:38, Antoine Pitrou firstname.lastname@example.org wrote:
On Fri, 1 Mar 2013 09:32:23 -0500 Barry Warsaw email@example.com 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.