Commits

Bob Ippolito committed b0dcf3a

create metaclass branch

Comments (0)

Files changed (1024)

pyobjc/.cvsignore

+Makefile
+Makefile.pre
+Setup
+config.c
+pyobjc
+sedscript
+.gdb_history
+build
+libffi-src

pyobjc/Doc/C-API.html

+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>
+Documentation for the PyObjC C-API (Preliminary)</title>
+</head>
+<body>
+<h2>Documentation for the PyObjC C-API (Preliminary)</h2>
+<h2><a name="introduction">Introduction</a></h2>
+<p><i>WARNING: This API is unstable and might change in the future. Please let
+us know if you want to use the C-API in your own code</i></p>
+<p>The PyObjC package can be extended in C (or more likely Objective-C) using
+the C API described in this document. This API should be used to write
+custom wrappers for &quot;hard&quot; methods and to create/access Objective-C proxy
+objects from the wrappers for C functions.</p>
+<p>IMHO this API shouldn't be used to write modules that &quot;just happen&quot; to
+work with Objective-C objects, using (static) methods in a class is much
+more convenient.</p>
+<p>The C API is defined in <code><span>pyobjc-api.h</span></code>. This file is currently not installed
+because the API is not entirely stable. This is the only file that can
+be included from outside of the 'Modules/objc' directory; future versions of
+the bridge may use additional linker flags to make sure that the module doesn't
+export symbols other than the module init function.</p>
+<p>The easiest way to wrap global functions and constants is by using the scripts
+in Scripts/CodeGenerators. These scripts are unsupported and might not work on
+anything but the Apple headers, but if they work it will save you a lot of work.</p>
+<h2><a name="limitations">Limitations</a></h2>
+<p>An important limitation of the current C API is that you can only use the API
+from one C file in the implementation of an extension module. This limitation
+will probably not be removed in future versions of the API.</p>
+<h2><a name="initialization">Initialization</a></h2>
+<p>The initialization function (below) should be called before using the
+rest of the API:</p>
+<pre>
+static int PyObjC_ImportAPI(PyObject* calling_module)
+</pre>
+<p>This module will return 0 if loading the module was successful, and -1
+otherwise. Reasons for failure include: not being able to locate the module
+and API version conflicts.</p>
+<p>Loading the API will make it impossible to unload the <code><span>calling_module</span></code>.</p>
+<p>NOTE: Using the API other than by the mechanism described in this document 
+is unsupported.</p>
+<h2><a name="compatibility-macros">Compatibility Macros</a></h2>
+<p>On Mac OS X, the version guard macro <code><span>MAC_OS_X_VERSION_MAX_ALLOWED</span></code> will 
+always be available.</p>
+<p>The macros <code><span>PyDoc_STR</span></code>, <code><span>PyDoc_VAR</span></code> and <code><span>PyDoc_STRVAR</span></code> are defined 
+when they are not defined in <code><span>Python.h</span></code>.</p>
+<h2><a name="types">Types</a></h2>
+<pre>
+PyObjCObject_Type
+
+int PyObjCObject_Check(value);
+</pre>
+<p><code><span>PyObjCObject_Type</span></code> is the type of Objective-C objects, both pure Objective-C
+objects and hybrid Python/Objective-C objects are instances of this type. Use
+<code><span>PyObjCObject_Check</span></code> to check if a value is an instance of this type.</p>
+<p>There is at most 1 proxy for an Objective-C instance. That is, you can use
+the <code><span>is</span></code> operator in Python to check if two variables refer to the same
+Objective-C object.</p>
+<pre>
+PyObjCClass_Type
+
+int PyObjCClass_Check(value);
+</pre>
+<p><code><span>PyObjCClass_Type</span></code> is the type of Objective-C classes, both pure Objective-C
+objects and hybrid Python/Objective-C classes are instances of this type. Use
+<code><span>PyObjCClass_Check</span></code> to check if a value is an instance of this type.</p>
+<p>There is at most 1 class proxy for an Objective-C class. That is, you can use
+the <code><span>is</span></code> operator in Python to compare two classes for equality.</p>
+<pre>
+PyObjCSelector_Type
+
+int PyObjCSelector_Check(value);
+</pre>
+<p><code><span>PyObjCSelector_Type</span></code> is the type of Objective-C methods (including the
+methods defined in Python).  Use <code><span>PyObjCSelector_Check</span></code> to check if a value 
+is an instance of this type.</p>
+<h2><a name="api-functions">API functions</a></h2>
+<pre>
+int PyObjC_RegisterMethodMapping(
+                     Class cls, 
+                     SEL sel, 
+                     PyObject *(callObjC)(PyObject*, PyObject*, PyObject*),
+                     IMP callPython);
+</pre>
+<p>Register a custom wrapper for a specific method. Returns -1 on failure.</p>
+<pre>
+int PyObjC_RegisterSignatureMapping(
+                     char* typespec,
+                     PyObject *(*callObjC)(PyObject*, PyObject*, PyObject*),
+                     IMP callPython);
+</pre>
+<p>Register a custom wrapper for methods with a specific signature. Returns -1
+on failure.</p>
+<pre>
+id PyObjCObject_GetObject(PyObject* obj);
+</pre>
+<p>Return the Objective-C object that is proxied by a <code><span>PyObjCObject_Type</span></code> 
+instance.</p>
+<pre>
+void PyObjCObject_ClearObject(PyObject* obj);
+</pre>
+<p>Clear the proxied object. That is, the <code><span>PyObjCObject_Type</span></code> instance will
+no longer be a proxy.</p>
+<pre>
+Class PyObjCClass_GetClass(PyObject* cls);
+</pre>
+<p>Extract the Class from a proxied Objective-C class.</p>
+<pre>
+PyObject* PyObjCClass_New(Class cls);
+</pre>
+<p>Create or find a proxy object for the class.</p>
+<pre>
+id PyObjC_PythonToId(PyObject* value);
+</pre>
+<p>Create a proxy for the Python object. This will unwrap proxied Objective-C 
+objects, and will create the appropriate proxy for Python objects.</p>
+<pre>
+PyObject* IdToPython(id value);
+</pre>
+<p>Create a proxy for the Objective-C object. This will unwrap proxied Python
+objects and will create a proxy object for Objective-C objects.</p>
+<pre>
+void PyObjCErr_FromObjC(NSException* localException);
+</pre>
+<p>Convert an Objective-C exception to Python. Use 
+<code><span>PyObjCErr_FromObjC(localException)</span></code> to convert the exception in an 
+<code><span>NS_HANDLER</span></code> block.</p>
+<p>Note that PyObjC supports round-tripping for exceptions, if the current 
+Objective-C exception is an converted Python exception, the original Python
+exception will be rethrown.</p>
+<pre>
+void PyObjCErr_ToObjC(void);
+</pre>
+<p>Convert a Python exception to Objective-C. This function does not return.</p>
+<p>Note that PyObjC supports round-tripping for exceptions, if the current Python
+exception is an converted Objective-C exception, the original Objective-C
+exception will be rethrown.</p>
+<pre>
+int PyObjC_PythonToObjC(const char* typespec, PyObject* value, void* buffer);
+</pre>
+<p>Convert the value to an Objective-C value of type <code><span>typespec</span></code>. The buffer must
+be at least <code><span>PyObjCRT_SizeOfType(typespec)</span></code> bytes long.</p>
+<p>NOTE: The <code><span>typespec</span></code> is a type specifier as described in the runtime 
+reference of the Objective-C manual from Apple. Use <code><span>@encode(mytype)</span></code> if to
+get code that is portable to a different Objective-C runtime.</p>
+<pre>
+PyObject* PyObjC_ObjCToPython(const char* typespec, void* value);
+</pre>
+<p>Convert an Objective-C value of type <code><span>typespec</span></code> to python.</p>
+<pre>
+PyObject* PyObjC_CallPython(id self, SEL sel, PyObject* arglist, int* isAlloc);
+</pre>
+<p>Call the Python implementation of method <code><span>sel</span></code> of <code><span>self</span></code>. The <code><span>arglist</span></code>
+must contain the complete argument list, including self. If <code><span>isAlloc</span></code> is not
+<code><span>NULL</span></code> it is used to output whether this method should return a new reference
+(TRUE) or a borrowed reference (FALSE).</p>
+<pre>
+int PyObjCRT_SizeOfType(const char* typespec);
+</pre>
+<p>Return the size of variables of the specified type.</p>
+<pre>
+int PyObjCRT_AlignOfType(const char* typespec);
+</pre>
+<p>Return the alignment of variables of the specified type.</p>
+<pre>
+Class PyObjCSelector_GetClass(PyObject* sel);
+</pre>
+<p>Return the class containing the definition of <code><span>sel</span></code>.</p>
+<pre>
+SEL PyObjCSelector_GetSelector(PyObject* sel);
+</pre>
+<p>Return the Objective-C method name for <code><span>sel</span></code>.</p>
+<pre>
+void PyObjC_InitSuper(struct objc_super*, Class, id);
+</pre>
+<p>Initialize the <code><span>struct</span> <span>objc_super</span></code> for use with <code><span>objc_sendMsgSuper</span></code>. Use 
+this if the <code><span>self</span></code> argument is a normal object.</p>
+<pre>
+void PyObjC_InitSuperCls(struct objc_super*, Class, Class);
+</pre>
+<p>Initialize the <code><span>struct</span> <span>objc_super</span></code> for use with <code><span>objc_sendMsgSuper</span></code>. Use 
+this if the <code><span>self</span></code> argument is a Class.</p>
+<pre>
+int  PyObjCPointerWrapper_Register(
+              const char* typespec, PyObject* (*pythonify)(void*),
+              int (*depythonify)(PyObject*, void*)
+      );
+</pre>
+<p>Use <code><span>pythonify</span></code> to convert pointers of type <code><span>typespec</span></code> to python and
+<code><span>depythonify</span></code> to extract them from Python. Use this to register helper 
+function for the conversion of opaque pointers.</p>
+<pre>
+id  PyObjCUnsupportedMethod_IMP(id, SEL);
+</pre>
+<p>Use this as an argument for <code><span>PyObjC_RegisterMethodMapping</span></code> or 
+<code><span>PyObjC_RegisterSignatureMapping</span></code> if the method is not callable from 
+Objective-C.</p>
+<pre>
+PyObject* PyObjCUnsupportedMethod_Caller(PyObject*, PyObject*, PyObject*);
+</pre>
+<p>Use this as an argument for <code><span>PyObjC_RegisterMethodMapping</span></code> or 
+<code><span>PyObjC_RegisterSignatureMapping</span></code> if the method is not callable from Python.</p>
+<pre>
+int PyObjCObject_Convert(PyObject* object, void* pvar);
+</pre>
+<p>This is a variation on <code><span>PyObjC_PythonToId</span></code> than can be used with 
+<code><span>PyArg_Parse</span></code>.</p>
+<pre>
+int PyObjCClass_Convert(PyObject* object, void* pvar);
+</pre>
+<p>This is a variation on <code><span>PyObjCClass_GetClass</span></code> than can be used with 
+<code><span>PyArg_Parse</span></code>.</p>
+<pre>
+int PyObjCSelector_Convert(PyObject* object, void* pvar);
+</pre>
+<p>Write the <code><span>SEL</span></code> for a selector object into <code><span>*pvar</span></code>. 
+For use with <code><span>PyArg_Parse</span></code>.</p>
+<pre>
+int PyObjC_ConvertBOOL(PyObject* object, void* pvar);
+</pre>
+<p>Write <code><span>YES</span></code> into <code><span>*pvar</span></code> if <code><span>object</span></code> is true, write <code><span>NO</span></code> otherwise.
+<code><span>*pvar</span></code> should be of type BOOL.  For use with <code><span>PyArg_Parse</span></code>.</p>
+<pre>
+int PyObjC_ConvertChar(PyObject* object, void* pvar);
+</pre>
+<p>Write the value of a string of length 1 into the character (type char)
+at <code><span>*pvar</span></code>. For use with <code><span>PyArg_Parse</span></code>.</p>
+</body>
+</html>

pyobjc/Doc/C-API.txt

+================================================
+Documentation for the PyObjC C-API (Preliminary)
+================================================
+
+Introduction
+------------
+
+*WARNING: This API is unstable and might change in the future. Please let
+us know if you want to use the C-API in your own code*
+
+The PyObjC package can be extended in C (or more likely Objective-C) using
+the C API described in this document. This API should be used to write
+custom wrappers for "hard" methods and to create/access Objective-C proxy
+objects from the wrappers for C functions.
+
+IMHO this API shouldn't be used to write modules that "just happen" to
+work with Objective-C objects, using (static) methods in a class is much
+more convenient.
+
+The C API is defined in ``pyobjc-api.h``. This file is currently not installed
+because the API is not entirely stable. This is the only file that can
+be included from outside of the 'Modules/objc' directory; future versions of
+the bridge may use additional linker flags to make sure that the module doesn't
+export symbols other than the module init function.
+
+The easiest way to wrap global functions and constants is by using the scripts
+in Scripts/CodeGenerators. These scripts are unsupported and might not work on
+anything but the Apple headers, but if they work it will save you a lot of work.
+
+Limitations
+-----------
+
+An important limitation of the current C API is that you can only use the API
+from one C file in the implementation of an extension module. This limitation
+will probably not be removed in future versions of the API.
+
+
+Initialization
+--------------
+
+The initialization function (below) should be called before using the
+rest of the API::
+
+  static int PyObjC_ImportAPI(PyObject* calling_module)
+
+This module will return 0 if loading the module was successful, and -1
+otherwise. Reasons for failure include: not being able to locate the module
+and API version conflicts.
+
+Loading the API will make it impossible to unload the ``calling_module``.
+
+NOTE: Using the API other than by the mechanism described in this document 
+is unsupported.
+
+Compatibility Macros
+--------------------
+
+On Mac OS X, the version guard macro ``MAC_OS_X_VERSION_MAX_ALLOWED`` will 
+always be available. 
+
+The macros ``PyDoc_STR``, ``PyDoc_VAR`` and ``PyDoc_STRVAR`` are defined 
+when they are not defined in ``Python.h``.
+
+Types
+-----
+
+::
+ 
+   PyObjCObject_Type
+
+   int PyObjCObject_Check(value);
+
+``PyObjCObject_Type`` is the type of Objective-C objects, both pure Objective-C
+objects and hybrid Python/Objective-C objects are instances of this type. Use
+``PyObjCObject_Check`` to check if a value is an instance of this type.
+
+There is at most 1 proxy for an Objective-C instance. That is, you can use
+the ``is`` operator in Python to check if two variables refer to the same
+Objective-C object.
+
+::
+ 
+   PyObjCClass_Type
+
+   int PyObjCClass_Check(value);
+
+``PyObjCClass_Type`` is the type of Objective-C classes, both pure Objective-C
+objects and hybrid Python/Objective-C classes are instances of this type. Use
+``PyObjCClass_Check`` to check if a value is an instance of this type.
+
+There is at most 1 class proxy for an Objective-C class. That is, you can use
+the ``is`` operator in Python to compare two classes for equality.
+
+::
+ 
+   PyObjCSelector_Type
+
+   int PyObjCSelector_Check(value);
+
+``PyObjCSelector_Type`` is the type of Objective-C methods (including the
+methods defined in Python).  Use ``PyObjCSelector_Check`` to check if a value 
+is an instance of this type.
+
+API functions
+-------------
+
+::
+
+   int PyObjC_RegisterMethodMapping(
+			Class cls, 
+			SEL sel, 
+			PyObject *(callObjC)(PyObject*, PyObject*, PyObject*),
+			IMP callPython);
+
+Register a custom wrapper for a specific method. Returns -1 on failure.
+
+::
+
+   int PyObjC_RegisterSignatureMapping(
+			char* typespec,
+			PyObject *(*callObjC)(PyObject*, PyObject*, PyObject*),
+			IMP callPython);
+
+Register a custom wrapper for methods with a specific signature. Returns -1
+on failure.
+
+::
+
+  id PyObjCObject_GetObject(PyObject* obj);
+
+Return the Objective-C object that is proxied by a ``PyObjCObject_Type`` 
+instance.
+
+::
+
+  void PyObjCObject_ClearObject(PyObject* obj);
+
+Clear the proxied object. That is, the ``PyObjCObject_Type`` instance will
+no longer be a proxy.
+
+::
+
+  Class PyObjCClass_GetClass(PyObject* cls);
+
+Extract the Class from a proxied Objective-C class. 
+
+::
+
+  PyObject* PyObjCClass_New(Class cls);
+
+Create or find a proxy object for the class. 
+
+::
+  
+  id PyObjC_PythonToId(PyObject* value);
+
+Create a proxy for the Python object. This will unwrap proxied Objective-C 
+objects, and will create the appropriate proxy for Python objects.
+
+::
+
+  PyObject* IdToPython(id value);
+
+Create a proxy for the Objective-C object. This will unwrap proxied Python
+objects and will create a proxy object for Objective-C objects.
+
+::
+
+  void PyObjCErr_FromObjC(NSException* localException);
+
+Convert an Objective-C exception to Python. Use 
+``PyObjCErr_FromObjC(localException)`` to convert the exception in an 
+``NS_HANDLER`` block.
+
+Note that PyObjC supports round-tripping for exceptions, if the current 
+Objective-C exception is an converted Python exception, the original Python
+exception will be rethrown.
+
+::
+
+  void PyObjCErr_ToObjC(void);
+
+Convert a Python exception to Objective-C. This function does not return.
+
+Note that PyObjC supports round-tripping for exceptions, if the current Python
+exception is an converted Objective-C exception, the original Objective-C
+exception will be rethrown.
+
+::
+
+  int PyObjC_PythonToObjC(const char* typespec, PyObject* value, void* buffer);
+
+Convert the value to an Objective-C value of type ``typespec``. The buffer must
+be at least ``PyObjCRT_SizeOfType(typespec)`` bytes long.
+
+NOTE: The ``typespec`` is a type specifier as described in the runtime 
+reference of the Objective-C manual from Apple. Use ``@encode(mytype)`` if to
+get code that is portable to a different Objective-C runtime.
+
+::
+
+  PyObject* PyObjC_ObjCToPython(const char* typespec, void* value);
+
+Convert an Objective-C value of type ``typespec`` to python. 
+
+::
+
+  PyObject* PyObjC_CallPython(id self, SEL sel, PyObject* arglist, int* isAlloc);
+
+Call the Python implementation of method ``sel`` of ``self``. The ``arglist``
+must contain the complete argument list, including self. If ``isAlloc`` is not
+``NULL`` it is used to output whether this method should return a new reference
+(TRUE) or a borrowed reference (FALSE).
+
+::
+
+  int PyObjCRT_SizeOfType(const char* typespec);
+
+Return the size of variables of the specified type.
+
+::
+
+  int PyObjCRT_AlignOfType(const char* typespec);
+
+Return the alignment of variables of the specified type.
+
+::
+
+  Class PyObjCSelector_GetClass(PyObject* sel);
+
+Return the class containing the definition of ``sel``.
+
+::
+
+  SEL PyObjCSelector_GetSelector(PyObject* sel);
+
+Return the Objective-C method name for ``sel``.
+
+::
+
+  void PyObjC_InitSuper(struct objc_super*, Class, id);
+
+Initialize the ``struct objc_super`` for use with ``objc_sendMsgSuper``. Use 
+this if the ``self`` argument is a normal object.
+
+::
+
+  void PyObjC_InitSuperCls(struct objc_super*, Class, Class);
+
+Initialize the ``struct objc_super`` for use with ``objc_sendMsgSuper``. Use 
+this if the ``self`` argument is a Class.
+
+::
+
+  int  PyObjCPointerWrapper_Register(
+	        const char* typespec, PyObject* (*pythonify)(void*),
+		int (*depythonify)(PyObject*, void*)
+	);
+
+Use ``pythonify`` to convert pointers of type ``typespec`` to python and
+``depythonify`` to extract them from Python. Use this to register helper 
+function for the conversion of opaque pointers.
+
+::
+
+  id  PyObjCUnsupportedMethod_IMP(id, SEL);
+
+Use this as an argument for ``PyObjC_RegisterMethodMapping`` or 
+``PyObjC_RegisterSignatureMapping`` if the method is not callable from 
+Objective-C.
+
+::
+
+  PyObject* PyObjCUnsupportedMethod_Caller(PyObject*, PyObject*, PyObject*);
+
+Use this as an argument for ``PyObjC_RegisterMethodMapping`` or 
+``PyObjC_RegisterSignatureMapping`` if the method is not callable from Python.
+
+::
+
+  int PyObjCObject_Convert(PyObject* object, void* pvar);
+
+This is a variation on ``PyObjC_PythonToId`` than can be used with 
+``PyArg_Parse``.
+
+:: 
+ 
+  int PyObjCClass_Convert(PyObject* object, void* pvar);
+
+This is a variation on ``PyObjCClass_GetClass`` than can be used with 
+``PyArg_Parse``.
+
+::
+
+  int PyObjCSelector_Convert(PyObject* object, void* pvar);
+
+Write the ``SEL`` for a selector object into ``*pvar``. 
+For use with ``PyArg_Parse``.
+
+::
+
+  int PyObjC_ConvertBOOL(PyObject* object, void* pvar);
+
+Write ``YES`` into ``*pvar`` if ``object`` is true, write ``NO`` otherwise.
+``*pvar`` should be of type BOOL.  For use with ``PyArg_Parse``.
+
+::
+
+  int PyObjC_ConvertChar(PyObject* object, void* pvar);
+
+Write the value of a string of length 1 into the character (type char)
+at ``*pvar``. For use with ``PyArg_Parse``.

pyobjc/Doc/ProjectBuilder-SyntaxHighlighting.html

+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>
+Project Builder Python Support</title>
+<meta name="Author" content="Bill Bumgarner" />
+<meta name="Contact" content="&lt;bbum@codefab.com&gt;" />
+<meta name="version" content="0.1 (unsupported)" />
+<meta name="date" content="12/16/2002" />
+<title>
+Contents</title>
+</head>
+<body>
+<h2>Project Builder Python Support</h2>
+<table>
+<tbody valign="top">
+<tr><th >Author:</th>
+<td>Bill Bumgarner</td></tr>
+<tr><th >Contact:</th>
+<td>&lt;<a href="mailto:bbum@codefab.com">bbum@codefab.com</a>&gt;</td></tr>
+<tr><th >Version:</th>
+<td>0.1 (unsupported)</td></tr>
+<tr><th >Date:</th>
+<td>12/16/2002</td></tr>
+</tbody>
+</table>
+<table width="90%" border="1" align="center">
+<tbody><tr><td><table width="100%"><tbody><tr>
+<td bgcolor="#ffff33" width="15%">
+Warning</td><td><p>None of this is documented or supported by <strong>Apple</strong>.  Don't ask <strong>Apple</strong> for
+support and don't blame me if something breaks.  A lot could break as
+<strong>Project Builder</strong> stores a tremendous amount of highly dynamic information in
+both the user defaults and within project files.</p>
+</td></tr></tbody></table></td></tr></tbody></table><h2>Contents</h2>
+<ul>
+<li><a href="#installation" id="id1" name="id1">Installation</a></li>
+<li><a href="#documentation" id="id2" name="id2">Documentation</a></li>
+<li><a href="#to-do" id="id3" name="id3">To Do</a></li>
+</ul>
+<p>Triple-quoted strings are not always treated correctly by Project Builder. This
+seems to be a Project Builder bug.</p>
+<h2><a href="#id1" name="installation">Installation</a></h2>
+<p>Create the directory 'Specifications' within
+<i>~/Developer/ProjectBuilder Extras/</i> or <i>/Developer/ProjectBuilder
+Extras/</i>:</p>
+<pre>
+mkdir -p ~/Developer/ProjectBuilder\ Extras/Specifications/
+</pre>
+<p>Copy the specification files into that directory:</p>
+<pre>
+cp Python.pb*spec ~/Developer/ProjectBuilder\ Extras/Specifications/
+</pre>
+<p>The binary installer will install the specifications for you.</p>
+<h2><a href="#id2" name="documentation">Documentation</a></h2>
+<p>The version of Project Builder that ships with the December Developer Tools
+modularizes the support for file types and syntax based colorizing of
+source files.  The base mechanisms and definitions are found in:</p>
+<p><a href="file:///System/Library/PrivateFrameworks/PBXCore.framework/Resources/">file:///System/Library/PrivateFrameworks/PBXCore.framework/Resources/</a></p>
+<p>Not surprisingly, Apple has provided a mechanism for augmenting and
+overriding the configuration information found within the PBXCore
+framework.  By creating a 'Specifications' directory within any of the
+<i>ProjectBuilder Extras</i> directories (<i>/Developer/ProjectBuilder Extras</i>
+and <i>~/Developer/ProjectBuilder Extras</i> being the two most common).</p>
+<p>All of the various specification files are simply property lists.  The file
+names do not appear to be significant beyond the extension.  That is,
+<i>Python.pblangspec</i> could have been called <i>Foo.pblangspec</i> and it would still
+work as expected.</p>
+<p>The contents of the two files were determined largely by looking through the
+files found in the PBXCore framework.  The list of keywords for python was
+generated by python itself:</p>
+<pre>
+In [1]: import keyword            
+In [2]: keyword.kwlist
+Out[2]: 
+['and',
+ 'assert',
+ 'break',
+ 'class',
+ 'continue',
+ 'def',
+ 'del',
+ 'elif',
+ 'else',
+ 'except',
+ 'exec',
+ 'finally',
+ 'for',
+ 'from',
+ 'global',
+ 'if',
+ 'import',
+ 'in',
+ 'is',
+ 'lambda',
+ 'not',
+ 'or',
+ 'pass',
+ 'print',
+ 'raise',
+ 'return',
+ 'try',
+ 'while',
+ 'yield']
+</pre>
+<h2><a href="#id3" name="to-do">To Do</a></h2>
+<ul>
+<li>NOTE: PyObjC's Project Builder support is unmaintained.  It is unlikely that
+any of these items will ever be completed.</li>
+<li>There are a number of other specification files found within the PBXCore.  Of
+particular relevance to Python would be the Compiler Specifications.  It
+would be extremely handy to be able to check syntax and compile Python code
+from within PBX directly.   This appears to be a matter of both specifying
+how the compiler should be invoked and providing a set of regular
+expressions for parsing the output.</li>
+<li>Instead of invoking Python directly, a compiler specification that used
+<a href="http://pychecker.sourceforge.net/">PyChecker</a> would provide both syntactical checker and higher level script
+integrity tests.</li>
+<li>Expanding the language definition to include a list of alternative keywords
+would provide for highlighting many common Python constructs and modules, as
+well.</li>
+<li>Looking at the internals to PBXCore, support for context-clicking (i.e. cmd-
+and opt- double-clicking on keywords found in Python source) could be
+supported if one were to build a custom Python Parser/Lexer as a PBX
+plugin.</li>
+<li>Support for Jython.  On the syntax front, this would be a matter of
+duplicating a number of the keyword bits from the Java configuration.  On
+the compiler front, support would focus on feeding through to the mechanism
+that turns Python source into .class files.   All of this assumes that
+Python and Jython source can (and should?) be differentiated.</li>
+</ul>
+</body>
+</html>

pyobjc/Doc/ProjectBuilder-SyntaxHighlighting.txt

+==============================
+Project Builder Python Support
+==============================