[IronPython] Silverlight, cannot import os module?
dan.eloff at gmail.com
Thu Apr 17 17:37:56 CEST 2008
Actually, asside from os.linesep, (which could be easily replaced) I
don't see anything that I would use, it was primarily because I was
trying to get linecache working in silverlight, but I gave up on that
and used (yours? fuzzymans?) traceback module without linecache. It'd
be nice to have os with almost no features for modules that import it,
so that you can use their non-os-using parts, but I can't think of one
real life example of a module like that.
On Thu, Apr 17, 2008 at 5:06 AM, Michael Foord
<fuzzyman at voidspace.org.uk> wrote:
> 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
> Users mailing list
> Users at lists.ironpython.com
More information about the Ironpython-users