[IronPython] import os
fuzzyman at voidspace.org.uk
Wed Apr 18 02:38:20 CEST 2007
David Jensen wrote:
> This is a very simple and obvious question. However, I am puzzled. I cannot do
> "import os" in ipy 1.0 or 1.1. Apparently, I have to import it from cpython
> according to codeplex? When I try importing ftplib, it says there is no os
> module. Why was an import of the os module not implemented? It would seem
> there would be numerous modules dependent on it. I am using an ironpython1.1
> folder which I carry with me on a usb drive. I did not "install" it on a local
> machine, although I did think I would have to because I can carry the regular
> python 2.4 on the usb drive. I cannot find ironpython documents or
> commentaries which mention the apparent inability to import the os module.
'os' is a Python standard library module. You can copy the Python 2.4
standard library onto your USB key and add that directory to 'sys.path'
in your script.
With the standard library on the path, import os will work fine.
> David Jensen
> Apartment 412
> 414 West 120th Street
> New York, New York 10027
> 646-245-2654 (cell)
> 206-984-4900 (fax to email)
> davidjensen at usa.net
> users mailing list
> users at lists.ironpython.com
More information about the Ironpython-users