Introduction to Python, COM and PythonCOM

11/25/99


Click here to start


Table of Contents

Introduction to Python, COM and PythonCOM

Introduction to Python, COM and PythonCOM

Section I

What Is Python?

Why Python?

Most obvious and notorious features

Pythonwin

Interactive Python

Variables and Types (1 of 3)

Variables and Types (2 of 3)

Variables and Types (3 of 3)

Assignment versus Equality Testing

Simple Data Types

Simple Data Types

Simple Data Types

High Level Data Types

High Level Data Types

High Level Data Types

High Level Data Types

High Level Data Types

High Level Data Types

Blocks

Blocks

Looping

Looping

Looping

Functions

Functions

Classes

Classes

Classes

Modules

Exceptions

Exceptions

Threads

Standard Library

External library

Python Programs

Python Programs

Python “Protocols”

Python “Protocols”

More Information on Python

Section II

What is COM?

What was COM

COM Interfaces

COM Interfaces

Classes

IUnknown interface

Creating objects, and obtaining interfaces

Other standard interfaces

Custom interfaces

IDispatch - Automation objects

IDispatch - Automation objects

IDispatch - Automation objects

VARIANTs

Implementation models

Distributed COM

The Windows Registry

Conclusion for Section II

Section III

PythonCOM architecture

Interfaces supported by PythonCOM

Using Automation from Python

Using Automation - Example

Using Automation - Example

Automation - Late vs. Early Bound

Automation - Late vs. Early Bound

Automation - Late vs. Early Bound

Playing with Excel

How did we know the methods?

Native Interfaces from Python

Native Interfaces from Python

Native Interfaces from Python Step 1: Import the necessary Python modules

Native Interfaces from Python Step 2: Obtain an object that implements the IShellLink interface

Native Interfaces from Python Step 2: Obtain an object that implements the IShellLink interface

Native Interfaces from Python Step 3: Obtain an IPersist interface from the object, and load the shortcut

Native Interfaces from Python Step 4: Use the IShellLink interface to get information about the shortcut

Implementing COM using Python.

Implementing COM using Python. Step 1: Implement a Python class that exposes the functionality

Implementing COM using Python Step 1: Implement a Python class that exposes the functionality

Implementing COM using Python Step 1: Implement a Python class that exposes the functionality

Implementing COM using Python Step 2: Annotate the class with special attributes

Implementing COM using Python Step 2: Annotate the class with special attributes

Implementing COM using Python Step 3: Register our COM object

Implementing COM using Python Step 3: Register our COM object

Testing our COM object

Testing our COM object

Summary

Questions?

More Information

Author: Mark Hammond

Email: mhammond@skippinet.com.au

Home Page: http://starship.python.net/crew/mhammond