Use IronPython to access COM object in a browser?
Question: I am trying to use a COM object by IronPython in a browser. I have tried the
following code in ipy.exe and it works fine:

    
    
    from System import Type, Activator
    Activator.CreateInstance(Type.GetTypeFromProgID("Word.Application"))
    

But if I use the code a a browser like this:

    
    
    <html>
    <script type="text/python"> 
    from System import Type, Activator
    Activator.CreateInstance(Type.GetTypeFromProgID("Word.Application"))
    </script>
    </html>
    

It just doesn't work.

I want to know if there are restrictions when using IronPython in a browser.
Did I miss something?


Answer: Silverlight, which is what allows IronPython in the browser has strict
security. Silverlight's sandbox requires the IronPython code to run in an
internet domain (localhost included), but not the local domain (directly from
the file-system). You might find some more information from Jimmy Schementi's
[blog](http://blog.jimmy.schementi.com/2010/03/pycon-2010-python-in-
browser.html).

