Python in Internet Explorer

Bill Bell bill-bell at bill-bell.hamilton.on.ca
Tue May 22 18:21:50 EDT 2001


"Darren Watson" <Darren.Watson3 at ntlworld.com>
> Is it possible to use Python as a scripting language for HTML pages in
> a similar way to VBScript?

Darren,

Yes, it's possible.

Hammond & Robinson, "Python Programming on Win32" (O'Reilly) 
discuss this in chapter 21. According to them:

1. "When you install the Python Win32 extensions, the Python 
Active Scripting implementation is automatically registered. If for 
some reason you need to install it manually, you should run the 
Python script python\win32comext\axscript\client\pyscript.py."

2. "IE explicitly tells Python that it should operate in an untrusted 
mode, and Python complies by seriously restricting the operations 
the script can perform. For example, when running in Internet 
Explorer, it's impossible to import Python extension modules (such 
as win32api), open local files, create sockets, and so forth."

3. And on IIS, "ASP also allows Python to run completely 
unrestricted." (Just use "runat".)

Incidentally, although I'm not at all new to programming I'm new to 
Python and this is a very useful and readable book.

Regards,

Bill




More information about the Python-list mailing list