I'd like to know if the fix below looks reasonable to you, this is a
diff against current svn trunk:
dreamweaver[matplotlib]> svn diff
--- __init__.py (revision 8656)
+++ __init__.py (working copy)
@@ -880,10 +880,14 @@
if 'matplotlib.backends' in sys.modules:
if warn: warnings.warn(_use_error_msg)
- arg = arg.lower()
name = arg
+ # For non-module backends, normalize name to lowercase. Note that this
+ # must NOT be done to module backends, because those need to be valid
+ # Python module specifications that can be imported, and Python module
+ # names *are* case sensitive.
+ arg = arg.lower()
be_parts = arg.split('.')
name = validate_backend(be_parts)
if len(be_parts) > 1:
##### END PATCH
I hope the comments explain clearly enough the problem. For a bit of
context, this is biting us in ipython where we're building a custom
backend for Qt terminals that inline mpl figures (very neat ), but
our backend's name is module://IPython.zmq.pylab.backend_payload_svg.
If you lowercase that, it won't import later. I know we shouldn't
have called IPython's module with that funny capitalization, but it's
a bit late to change now, I'm afraid.
Do you foresee any problems with the above change?
If everyone OK's it, I'm happy to commit it, but I won't do anything
until others better informed than I reply.
 teaser for the curious:
http://fperez.org/tmp/ipython_qt_pylab.png. All code is in the
'newkernel' github branch. Special credits to Evan Patterson from
Enthought, the Qt brains behind the magic.