[IronPython] os.path functions give wrong result on non-Windows platforms

Sanghyeon Seo sanxiyn at gmail.com
Thu Dec 29 07:06:07 CET 2005

Currently, os.path module is same as ntpath, and gives wrong result on
non-Windows platforms.

IronPython 0.9.6 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import os
>>> os.path.join('a', 'b')

Currently, I have the following code in my site.py, but obviously this
is not the correct solution:

import System
import os
if str(System.Environment.OSVersion.Platform) == 'Unix':
    import posixpath
    os.path = posixpath

Any idea?

Seo Sanghyeon

More information about the Ironpython-users mailing list