PyObjC Examples

Simple scripts that demo the core modules

The directory Scripts contains a number of simple command-line scripts that make use of Cocoa features.

Cocoa Applications

The directory AppKit contains example applications using the Cocoa Application Framework (aka "AppKit").

Most of the following examples contain a setup.py script that can build an application. See Building applications for details how to invoke these scripts. Some examples contain an Xcode or Project Builder project file; simply double-click it and choose Build and Run, or invoke xcodebuild or pbxbuild from the command line depending on which you have installed.

Cocoa Bindings

The CocoaBindings directory contains a number of examples that make use of Key-Value Coding and Cocoa Bindings. These scripts require Mac OS X 10.3 or later.

CoreData

The directory CoreData contains a number of examples that use the CoreData framework. This framework is available in MacOS X 10.4 and later.

Foundation

The directory Foundation contains a number of examples that use only Foundation facilities.

Inject

The directory Inject contains a number of examples that use the objc.inject facility to inject code into another process. These examples require Mac OS X 10.3 or later.

OpenGL

The directory OpenGL contains a number of examples that use OpenGL with a Cocoa UI. These examples also require PyOpenGL.

Plugins

The directory Plugins contains a number of examples that embed a Python plugin into another application. Note that due to an implementation detail of the py2app bundle template, these plugins are only compatible with Mac OS X 10.3 and later.

Twisted Integration

The directory Twisted contains a number of examples that use Twisted (2.0 or later) with Cocoa.

WebKit

The directory WebKit contains a number of examples that use the WebKit framework, the HTML rendering engine from Safari.

Some work-in-progress examples

The directory NonFunctional may contain a number of examples that are not working for one reason or another. The most likely reason is that example relies on features that have not yet been implemented.