Author: | Bill Bumgarner |
---|---|
Contact: | bbum@mac.com |
To use the project templates, simply copy (or link) them into the Project Templates directory used by Xcode. The Xcode templates are also included in the PyObjC installer package.
loadBundle()
function in the objc
module:objc.loadBundle("MyFramework", globals(), bundle_path="/path/to/MyFramework.framework")
This has the effect of importing all of the classes in the bundle or framework into the current python scope's globals. For all intents and purposes, it is similar to:
from Foundation import *
- The Project Templates directory includes a clean.py script that removes noise files from the project templates. When working on project templates, it is recommended that this script be invoked before creating a test project from one of the templates. For example, the presence of user specific project builder settings will cause any projects created from a template to be incorrect.
The Cocoa-Python templates all create various different kinds of Cocoa application projects. Be sure and pick the correct project type for your needs.
A project created from this template is designed to implement standalone, pure-Python, applications that are compatible with Apple's build of Python as well as all other builds of python that support PyObjC.
When building the 'install' target, the resulting application wrapper will included the PyObjC module and can be launched on any stock Mac OS X 10.3 system without requiring PyObjC to be preinstalled.