Python in HTAs

Robby Russell robby at planetargon.com
Sun Oct 17 17:59:41 EDT 2004


On Sun, 2004-10-17 at 14:25 -0700, Marcel van den Dungen wrote:
> Does anybody know how to use Python as the scripting language for HTML
> applications? I tried the following, but I get a script error ('Object
> expected') on the body element.
> 
> <html>
> <head>
> <title>Python controlled HTML application</title>
> <hta:application id="oApplication">
> <script language="python">
> def Onload():
>     alert('hello from python')
>     document.all["idspan"] = 'hello from python'
> </script>
> </head>
> <body onload="Onload();">
> <span id="idspan" ></span>
> </body>
> </html>
> 
> Could not find any example on Google either.
> 
> TIA,
> Marcel

This isn't going to work unless your browser has some special plugin to
allow python scripts to run in it. Google probably turned up nothing as
you might be one of the first people to consider this. ;-)

-Robby

-- 
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | robby at planetargon.com
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20041017/f7c2abdb/attachment.sig>


More information about the Python-list mailing list