AOLserver Web Server

This is a Web Server created and used by AOL. Note that anyone using AOLserver would be better off learning TCL. For details, see The project that embeds Python in the AOLServer Web Server, is now semi-stable for simple CGI-style operations, and provides a 4-5x speedup over the straight CGI. Check it out at http pywx.sourceforge.net. Microsoft IIS and PWS You can set up both Microsoft IIS Server and Personal Web Server (PWS) to call the Python interpreter to handle Python CGI scripts.

Python XML Package

For those who want to play around with XML in Python, there will be a Python XML package to serve several purposes at once. This package will contain everything required for basic XML applications, along with documentation and sample code basically, something easy to compile and install. A release candidate of the latest release of this package is now available as PyXML-0.5.5.tar.gz (GPG signature), dated June 5, 2000. This version contains SAX, the Pyexpat module, sgmlop, the prototype DOM...

Summary

This chapter explains how to use Python to interface objects from different applications on a single machine, and across networks through distributed systems. Python has very comprehensive support for object interfacing and distributing technologies. COM is the most widely used component software model in the world when it comes to object interfacing. COM provides a rich set of integrated services, a wide choice of easy-to-use tools, and a large set of available applications. The COM genealogy...

Wave Module

This module enables you to read, parse, and create wave .wav files where file is either the name of a file or an open file pointer. The open file pointer must have methods read , seek , and close . When the setpos and rewind methods are not used, the seek method is not necessary. This function returns an instance of a class with the following public methods Table 9.1. Public Methods Exposed by the wave Module for an Instance of a Class That Can Read from a Table 9.1. Public Methods Exposed by...

Environment Variables

Environment variables are one of the methods that Web servers use to pass information to a CGI script. They are created and assigned appropriate values within the environment that the server produces for the CGI script. The next code generates a list of all environment variables that you have available at the moment, in your browser. import os print Content-type text html n print of Environment print lt BODY gt print s gt s lt BR gt k,v print The following list is the output collected from my...

The Tkinter Module

Tkinter is Python's de facto standard GUI toolkit. It's the most cross-platform GUI. Many applications are written using Tkinter because it is a very powerful and flexible tool. Maybe the most notable features are its geometry management, which is much better than standard windows, and its efficient Text and Canvas widgets. Many toolkits support as good as or better geometry management some of them are listed in this chapter . Tkinter, which stands for Tk interface, is the standard Python...

Code Examples

This example generates a Python COM server that exposes a parking lot object. The example uses a Visual Basic graphical interface to manipulate the vehicles of this parking lot. Each vehicle is a Python Object that is also defined as a Python COM Server object. The first thing to do is to generate two clsids one for each object. gt gt gt import pythoncom gt gt gt print pythoncom.CreateGuid BD2CB7C0-3BB9-11D4-804E-00 50 041A5111 gt gt gt print pythoncom.CreateGuid BD2CB7C1-3BB9-11D4-804E-00 50...

ActiveX

An ActiveX control is an OLE control that can live inside an HTML page it can be simple Window objects, such as buttons, text boxes, or scrollbars. It also can be quite complicated, for example, a bar chart graph display can be an ActiveX control. An entire spreadsheet can also be a single control. Each ActiveX control has properties and reacts to external events. Its properties can be modified to change its appearance. For example, its containing program can set color and fonts. External...

Implementing COM Objects in Python

Script Form Edit Delphi

In order to implement COM objects in the Python version of Windows, you need a set of extensions developed by Mark Hammond and Greg Stein. Part of the win32com package, these extensions enable you to do everything that is COM-related, including writing COM clients and COM servers. The following link takes you to the download page of these extensions All the Win32 extensions including the COM extensions are part of the win32all installation package. This package also installs the PythonWin IDE...

PyFLTK

FLTK Fast Light Tool Kit, pronounced fulltick is a C graphical user interface toolkit for X UNIX , OpenGL, and WIN32 Microsoft Windows NT 4.0, 95, or 98 . It is also largely compatible with the XForms library. FLTK is currently maintained by a small group of developers across the world with a central repository in the United States, and it is distributed under the GNU Library GPL LGPL . FLTK was originally created to build in-house applications at Digital Domain for image processing and 3D...