[IronPython] Reopening closed issues

Jimmy Schementi Jimmy.Schementi at microsoft.com
Thu Sep 11 00:00:51 CEST 2008


To clarify, "imports" today only look in the XAP file, they do not make a HTTP request. The HTTP request was made back in the SL1.1 days when we didn't have a XAP.

In the future, this may also be able to look in IsolatedStorage, but we won't be making HTTP requests, since the request can only be made with asynchronously, and that would require continuation support.

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Dan Eloff
> Sent: Tuesday, September 09, 2008 5:05 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] Reopening closed issues
>
> > In Silverlight 2 Beta 2 imports are definitely done from inside the
> xap file
> > - and the module names that come back indicate that at the very least
> you
> > know the name of the file fetched.
> >
>
> Yes, GetResourceStream is used to access files in the .xap file.
> However, the module names come back in whatever case they were
> requested. Which means modules can be imported more than once if you
> use a different case.
>
> >>> import sTRING
> >>> sTRING
> <module 'sTRING' from 'sTRING.py'>
> >>> import string
> >>> string
> <module 'string' from 'string.py'>
>
> Furthermore it seems to me that from pkg import NAME can return a
> submodule name.py instead of a global variable NAME in pkg/__init__.py
> if executed before NAME is defined (say by something imported in
> pkg/__init__.py above declaration of NAME) This is actually how I
> stumbled across this.
>
> So this causes some very strange and hard to debug behavior. Hopefully
> there will be a way to fix this bug.
>
> -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