# COMKit User's Guide

Version 0.8.1
Webware for Python 0.8.1

## Synopsis

COMKit allows Microsoft Windows users to use COM objects inside of their WebKit servlets.

## Feedback

You can e-mail webware-discuss@lists.sourceforge.net to give feedback, discuss features and get help using COMKit.

## Overview

If you try to use the win32com module within your WebKit servlets without using this plug-in, you will encounter COM errors due to the fact that each thread used with COM needs to be initialized properly for COM usage. This plug-in provides the proper initialization of each WebKit thread to allow COM to work properly.

When this plug-in is enabled, it configures COM in free-threading mode when used in conjunction with ThreadedAppServer or AsyncThreadedAppServer. If you've never used COM before, or if you'd like to learn what "free-threading mode" means, you should get a copy of the fine book Python Programming on Win32 by Mark Hammond and Andy Robinson and pay special attention to the chapters about COM and also Appendix D for details on COM threading models.

## Usage

To use COM, simply set EnableCOM to 1 in your AppServer.config file. This causes the app server threads to be configured properly for COM free-threading. Then go ahead and use win32com inside your servlets.

There's a simple example servlet that uses ADO for database access in ADOSample.py in the COMKit/Examples directory.

## Known Bugs

There are no known bugs, and there is no planned future work.

## Credit

Authors: Geoff Talvola