[IronPython] importing os module

Martin Maly Martin.Maly at microsoft.com
Mon Oct 31 19:48:31 CET 2005

You can set sys.path to point to CPython's Lib directory which includes os module:

>>> import sys
>>> sys.path.append("C:\\Python24\Lib")
>>> import os
>>> os.name

You can even put the first 2 lines into your site.py (located in IronPython's Bin\lib directory)



From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Papanii Okai
Sent: Friday, October 14, 2005 8:26 PM
To: users at lists.ironpython.com
Subject: [IronPython] importing os module

Hi Guys,
          I was testing out Iron Python and I was trying to test out the OS module but I got the error ..

TraceBack (most recent call last)
            At <shell>
ImportError: No module named os..

Obviously it doesn't exist. Thus is there any means to get around this?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20051031/d7a0afb5/attachment.html>

More information about the Ironpython-users mailing list