[IronPython] Silverlight, cannot import os module?

Michael Foord fuzzyman at voidspace.org.uk
Thu Apr 17 12:06:43 CEST 2008

Dan Eloff wrote:
> I've added os.py and ntpath.py to my .xap, but the trouble is os uses
> sys.builtin_module_names to detect platform, and there is no platform
> specific module in there for silverlight.
> Maybe it is os.py (using CPython 2.5 version) that needs to be changed
> to support a silverlight platform? Or to stop throwing when no
> platform detected?
> Or maybe IronPython should have a minimal or empty nt builtin module
> for silverlight, since probably that's the closest to the desired
> behavior.
> Surely somebody else has come across this? I'm going to hack os.py for
> now to allow me to continue past this.

Out of interest - what features of os do you want to use?

You could post a bug on the Python tracker that os.py fails to import on 
platforms with no 'platform' (and mention that it is in SIlverlight). A 
patch would be good too.

Michael Foord

> Thanks,
> -Dan
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

More information about the Ironpython-users mailing list