[Pythonmac-SIG] How to I covert a Mac framework into a python module

Ronald Oussoren ronaldoussoren at mac.com
Sun Sep 10 13:52:13 CEST 2006


On Sep 10, 2006, at 12:12 PM, samantha wrote:

> Ronald Oussoren wrote:
>>
>> On Sep 10, 2006, at 7:59 AM, Samantha Atkins wrote:
>>
>>> I see all of these nice apparent python modules for Foundation,
>>> SyncServices, etc. corresponding to several objc frameworks.  I  
>>> would
>>> like to know how these are made and especially how to update them  
>>> when
>>> the underlying frameworks have changed.  Thanks for any leads.
>>
>> Those are part of PyObjC. Changes to classes are picked up  
>> automaticly (the frameworks are scanned for Objective-C classes  
>> and their methods when the wrapper module is loaded), constants  
>> and global functions are picked up when PyObjC is build from source.
>>
>> The binary installer for the latest release of PyObjC (at http:// 
>> pyobjc.sf.net) should be fairly complete and I consider missing  
>> values a bug.
>>
>> Ronald
>>
>
> Well I am working on pre-release of Leopard so it is not surprising  
> to me that some things are not there.  In particular I have noticed  
> some formal protocols are missing.   If there is automatic scanning  
> going on it is missing a few things.   Is there a way I can  
> manually patch things up?  If someone will point me to the scanning  
> code I will be glad to do some digging and debugging.

Scripts/gen_all_protocols.py scans all frameworks for informal  
protocols and adds those to the wrappers in the source tree. Formal  
protocols are found at runtime, but only if there are classes that  
actually use those protocols due to the way we locate protocols.

There are some minor issues with the current PyObjC tree on the  
Leopard preview, luckily no really complex ones. I have patches for  
these issues in a private tree, but cannot check those in because the  
previews are under NDA.

Ronald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2157 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20060910/079aa2e3/attachment.bin 


More information about the Pythonmac-SIG mailing list