matplotlib/matplotlib — pull request #2503 by mdboom (2013-10-07 18:18:49+00:00)
Title: Fix interactive mode detection

@jrevans: Does fix the bulk of your issue in this comment?

https://github.com/matplotlib/matplotlib/commit/9fbd29fa9f41f0c3291ab14220d61ba4029eb405#commitcomment-4267815

I'm not sure I agree with your assertion that `is_interactive() === rcParams['interactive']`, but I do think we should keep `python -i script.py` working.