On Mon, Mar 4, 2013 at 4:39 PM, Michael Foord <fuzzy...@voidspace.org.uk> wrote: > > On 1 Mar 2013, at 18:38, Antoine Pitrou <solip...@pitrou.net> wrote: > >> On Fri, 1 Mar 2013 09:32:23 -0500 >> Barry Warsaw <ba...@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. - Jeff _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com