[IronPython] Using WebClient with Gestalt

Mark Heath mark.heath at gmail.com
Thu Oct 28 16:34:09 CEST 2010


I'm writing an IronPython Silverlight application and trying to use
WebClient to download some xaml so I can use XamlReader.Load to load it. I
have the following code in a .py file that is referenced by my main HTML
page:

wc = WebClient()
wc.DownloadStringCompleted += self.xamlDownloaded
wc.DownloadStringAsync(Uri('star.xaml',UriKind.Relative))

however, in the completed handler I get a SystemError - not found. I know
that the xaml file is present, so I'm wondering if it is looking for it
relative to dlr.xap. I didn't get much more success with an absolute Uri -
just a SystemError with no message at all, which I guess could be due to
Silverlight cross-domain request permissions.

Any suggestions for how I can get this working?

And another quick question while I'm at it. Are there any known issues with
IronPython and data-binding in Silverlight? I converted an IronPython WPF
app to Silverlight that was using MVVM, but in Silverlight none of the
bindings worked at all.

thanks
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20101028/bc1f3a00/attachment.html>


More information about the Ironpython-users mailing list