Can Python work like Java Applet?

John J. Lee jjl at pobox.com
Wed Oct 22 13:50:28 EDT 2003


Alan Kennedy <alanmk at hotmail.com> writes:
[...]
> [Jim Dabell]
> > Of course you can, that's the whole point!
> > 
> > Anyway, to answer the original question, browsers don't have a built-in
> > Python runtime, 
> 
> Actually, that's not strictly true. The win32all windows extensions
> install a python interpreter COM object, which can used as a scripting
> plugin with the Windows Scripting Host (WSH), meaning that one can
> embed python in an HTML page, in the same manner as Javascript.
> 
> Documentation is here:
> 
> http://www.python.org/windows/win32com/ActiveXScripting.html
> 
> However, your script will only run on Internet Explorer browsers that

I think Mozilla supports this too (PyXPCOM).


> have python *registered* as a scripting language. Which is possibly
> not a problem on an Intranet, where one can make's one's users install
> the plugin, but is unlikely to have widespread support on the
> Internet.
[...]

I suppose you could write an ActiveX control to distribute CPython.
Writing a Java applet with Jython is the sane way to do it, of course
(security and amount of data to be transferred to the client).


John




More information about the Python-list mailing list