Executing a python script from an HTML link?

John Roth newsgroups at jhrothjr.com
Tue Sep 23 18:32:27 CEST 2003


"Andrew Chalk" <achalk at XXXmagnacartasoftware.com> wrote in message
news:tMYbb.382$zy3.566196578 at newssvr11.news.prodigy.com...
> Is this possible? In my CGI app. I display a web page with a link
(anchor).
> When the link is clicked I want to exectute a python script rather than go
> to an HTML page.

Do you want to run the script on the server or the client? If you
want to run it on the client, you can use Python instead of Javascript
(or in addition to Javascript) in the web page. Look at the <script>
tag for the language (I think that's the one - I haven't looked it up
recently) attribute. Otherwise, just invoke Python the same way you would
invoke any other executable, and use the script name as the
first parameter.

John Roth

>
> Many thanks.
>
>






More information about the Python-list mailing list