On 5 Mar 2013, at 05:39, Jeff Hardy
On Mon, Mar 4, 2013 at 4:39 PM, Michael Foord
wrote: On 1 Mar 2013, at 18:38, Antoine Pitrou
wrote: On Fri, 1 Mar 2013 09:32:23 -0500 Barry Warsaw
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
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. Thanks.
- Jeff
-- http://www.voidspace.org.uk/ 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 http://www.sqlite.org/different.html