[IronPython] Couple of questions on silverlight on json and calling js from python and back

Vineet Jain (gmail) vinjvinj at gmail.com
Sun Sep 14 01:56:04 CEST 2008


1. From looking at the flikr Ruby example, it seems that silver light ships
with the JSON parser built in. I can't seem to find an example of someone
using it from IronPython. Can someone please help me with how I would modify
the short script below to handle json data back from the server. 

 

    def completed(s, e):

        try:

            Document.ajaxupdate.innerHTML = e.Result

        except:

            Document.ajaxupdate.innerHTML = 'Error'

 

    uri = Uri('http://127.0.0.1/function_that_returns_json')

    web = WebClient()

    web.DownloadStringCompleted += completed

    web.DownloadStringAsync(uri)

 

2. Just want to confirm that we still must use the scriptable from C# to
call ironpython function from js in silverlight beta 2 as outlined in the
following thread:

 
http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2007-July/005298.
htm

 

Thanks,

 

Vineet

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080913/d10f3e81/attachment.html>


More information about the Ironpython-users mailing list