matplotlib/matplotlib — pull request #1825 by mgiuca-google (2013-03-15 02:40:43+00:00)
Title: Work around missing subprocess members on Google App Engine

On Google App Engine, the `subprocess` module exists, but is empty. This patch introduces a replacement module, `subprocess_fixed`, which provides a stub for `subprocess.Popen` which is compatible with existing usage.

I noticed that `cbook` already has a bit of a hack to work around the fact that `subprocess.check_output` is missing in Python 2.6, so I've moved that into my `subprocess_fixed` module as well, so now it has two reasons to exist.

Calls to `subprocess_fixed.Popen` on Google App Engine always raise `OSError`, which most of the codebase is already prepared for (since that's what happens when the application is missing). I've added a few missing catches of `OSError`.

Partial fix for Issue #1823.