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
'nt'
You can even put the first 2 lines into your site.py (located in IronPython's Bin\lib directory)
 
Martin
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Papanii Okai
Sent: Friday, October 14, 2005 8:26 PM
To: [email protected]
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

--Papanii

_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to