Windows Web Scripting Extensions

Although this book doesn’t cover the Windows-specific extensions available for Python in detail, a quick look at Internet scripting tools available to Windows programmers is in order here. On Windows, Python can be used as a scripting language for both the Active Scripting and the Active Server Pages systems, which provide client- and server-side control of HTML-based applications. More generally, Python programs can also take the role of COM and DCOM clients and servers on Windows. The .NET framework provides additional options for Python programmers.

This section is largely Microsoft specific—if you are interested in portability, other systems in this chapter may address your needs better (see Jython’s client-side applets, PSP’s server-side scripting support, and Zope’s server-side object publishing model). On the other hand, if portability isn’t a concern, the following techniques provide powerful ways to script both sides of a web conversation with Python.

Active Scripting: Client-Side Embedding

Active Scripting—sometimes known as ActiveX Scripting, or just ActiveX—is a technology that allows scripting languages to communicate with hosting applications. The hosting application provides an application-specific object model API, which exposes objects and functions for use in the scripting language programs.

In one of its more common roles, Active Scripting provides support that allows scripting language code embedded in HTML pages to communicate with ...

Get Programming Python, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.