reingart/pyfpdf — pull request #4 by kalbermattenm (2014-09-11 08:02:58+00:00)
Title: Avoid hash collision errors when loading PIL

This PR is related to https://github.com/reingart/pyfpdf/issues/3

In a project, if PIL is imported twice this error appears when PIL is imported through `import Image` (PIL should always be imported using `from PIL import Image`), thus this PR suggests to first try importing PIL using the `from ... import ...` syntax.

Python thinks indeed that it is importing two (or more) modules having the same name when using `import Image`. Moreover, the `AccessInit: hash collision: 3 for both 1 and 1` error is making Python crash.

Please review, thanks a lot