[Pythonmac-SIG] CoreGraphics deprecations
Ronald Oussoren
ronaldoussoren at mac.com
Thu Mar 4 12:28:06 CET 2010
On 4 Mar, 2010, at 7:04, Preston Holmes wrote:
> pdf = CGPDFDocumentCreateWithProvider(CGDataProviderCreateWithFilename(aFile))
> pdf.getTrimBox(pageNumber).getWidth()
>
> I get warning output like:
>
> Wed Mar 3 21:48:07 element.sd.cox.net Python[24469] <Error>: The function `CGPDFDocumentGetTrimBox' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Please use `CGPDFPageGetBoxRect' instead.
>
> However from doing a dir(pdf) I don't see the preferred method exposed through the python bindings.
>
> This is 10.5.8 with stock python2.5
>
> in 10.6.2 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/CoreGraphics/_CoreGraphics.so isn't even 64bit
>
> I don't use this stuff often, but are python bindings to OS X to libraries like this withering on the vine?
The CoreGraphics module is slowly dying and there is nothing we can do about it: it is maintained by Apple and is not opensource (and the last time I checked it used undocumented APIs and is therefore unlikely to ever be opensourced).
There is a replacement though: pyobjc-framework-Quartz has the Quartz module which provides bindings to the same APIs, but using a different synta (such closer to the C API).
Ronald
>
> -Preston
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100304/0747d066/attachment.bin>
More information about the Pythonmac-SIG
mailing list