Apple publishes a whole load of open source code examples. There's a PDF parser in python which exists in a couple of slightly different versions. However, none of them work.
They all produce a variety of syntax errors or crash the python process!
Here's another, with a few differences:
Any idea how I tell which is the most up-to-date version? Should I report this to bugreporter?