I received a reminder today on a module I modified: v v v dsblank <http://www.codeplex.com/site/users/view/dsblank> wrote Today at 8:01 AM Remember that IronPython runs on many different operating systems. It isn't clear from the patch if this works on Mac and Linux under Mono. ^ ^ ^ Which brings up a really good point....
How do I tell what operating system IronPython is running on? The original module (webbrowser.py) has lots of operating systems specific code, all separated by: if os.platform[:3] == 'win' which I have modified to: if os.platform[:3] in ['win','cli'] but that assumes that mono emulates Windows to a high degree, which thing I doubt. The best guess I can make as to more correct code would be: if os.platform[:3] == 'win' or (os.platform[:3] == 'cli' and os.linesep == '\r\n') Yeeach! How should I really be doing it? -- Vernon Cole
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com