Python Scripting in Windows MSIE 6.0

jmdeschamps jmdeschamps at cvm.qc.ca
Wed Jun 9 23:15:33 EDT 2004


"Claudio Grondi" <claudio.grondi at freenet.de> wrote in message news:<2ipfihFq4aunU1 at uni-berlin.de>...
> I wonder why the subject (Python scripting within HTML) is not
> occuring in any past postings - do I miss something very obvious?
> 
> I try to run Pythons scripting in Windows MSIE 6.0 in the
> <script language="Python">...</script> section, but it doesn't
> work at all.
> \Python23\Lib\site-packages\win32comext\axscript\client\pyscript_rexec.py
> runs ok, registry entries seems also be ok.
> I have the latest Python 2.3.4 installed.
> What do I wrong?
> Runs anyone of you (inspite of the security concerns) successfully
> Python as scripting language in Windows MSIE 6.0 HTML pages
> using it like JavaScript or VBScript ?
> 
> Thank you in advance for any help.
> 
> Claudio

If you mean to script "client-side" than the short answer is no(
(IMO).
In most browsers you can get a javascript interpreter or some other
ECMAscript compliant language (such as VBScript).
These language enforce *sandboxing* of web pages in order to protect
the client from downloading malicious software within the web page.
That is these interpreters cannot directly access the client machine
so it can't install modify or delete anything outside this sandbox
(generally limited to the memory space of the browser).

BUT Python is great for server-side scripting: plain CGI module works
just fine, and a plethora of frameworks built around/with/in Python
(see http://www.python.org/cgi-bin/moinmoin/WebProgramming), also
Python has divfferent socket modules to do it all yourself...
Python can also be used in PHP/ASP-like fashion with IIS servers,
meaning you can include Python code in HTML pages that IIS will
execute on the server before serving that page to the client.

Python even as a HTTPserver module that you could use on the client
itself - not very performant, but if your the only user of this server
(as it lies in a client machine) it should be good enough.

Also remember that while Python is free and available, its doesn't
necessarily reside on the client machines (and javascript will, within
a browser).

Have fun!

Jean-Marc



More information about the Python-list mailing list