> On 22 Apr 2017, at 10:45, Ben Byram-Wigfield <ben...@me.com> wrote:
> 
> I’ve been looking at Apple’s Open Source website, where there is lots of 
> python sample code. But the examples I’ve tried don’t work. They all flag 
> syntax errors (usually about type conversion), or occasionally make the 
> python process crash!
> 
> Particularly, I’m looking at a script to parse the contents of a PDF file. 
> There are a few slightly different versions (and I don’t understand all the 
> different folders — pyobj 14, 26, 47, 49???)
> 
> https://opensource.apple.com/source/pyobjc/pyobjc-49/pyobjc/pyobjc-framework-Quartz-2.5.1/Examples/Programming%20with%20Quartz/ParsePageContents/parse_page_contents.py
>  
> <https://opensource.apple.com/source/pyobjc/pyobjc-49/pyobjc/pyobjc-framework-Quartz-2.5.1/Examples/Programming%20with%20Quartz/ParsePageContents/parse_page_contents.py>
> 
> https://opensource.apple.com/source/pyobjc/pyobjc-14.1.1/pyobjc/stable/pyobjc-framework-Quartz/Examples/Programming%20with%20Quartz/ParsePageContents/parse_page_contents.py
>  
> <https://opensource.apple.com/source/pyobjc/pyobjc-14.1.1/pyobjc/stable/pyobjc-framework-Quartz/Examples/Programming%20with%20Quartz/ParsePageContents/parse_page_contents.py>
> 
> But none of them work. I’ve tried them on PyObjc 2.5.1 and 3.2.1, which gives 
> different syntax errors. (Question 2, why does OS X ship with only 2.5.1?)
> 
> I’ve scoured the internet for better examples of python-quartz-pdf_parsing, 
> but not found anything. The Apple Dev Forums suggested that the code wasn’t 
> maintained by Apple, but by PyObjC.

See http://pyobjc.sf.net/ <http://pyobjc.sf.net/>, which contains all current 
examples and those should work with the current release of PyObjC and python 
2.7 and 3.x.

Ronald

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to