@@ -42,14 +42,14 @@ def pylab_setup(backend=None):
4242 if backend .startswith ('module://' ):
4343 backend_name = backend [9 :]
4444 else :
45- backend_name = 'backend_' + backend
46- backend_name = backend_name .lower () # until we banish mixed case
47- backend_name = 'matplotlib.backends.%s' % backend_name .lower ()
45+ backend_name = 'backend_' + backend
46+ backend_name = backend_name .lower () # until we banish mixed case
47+ backend_name = 'matplotlib.backends.%s' % backend_name .lower ()
4848
4949 # the last argument is specifies whether to use absolute or relative
5050 # imports. 0 means only perform absolute imports.
51- backend_mod = __import__ (backend_name ,
52- globals (), locals (), [backend_name ],0 )
51+ backend_mod = __import__ (backend_name , globals (), locals (),
52+ [backend_name ], 0 )
5353
5454 # Things we pull in from all backends
5555 new_figure_manager = backend_mod .new_figure_manager
@@ -66,11 +66,19 @@ def do_nothing_show(*args, **kwargs):
6666Please select a GUI backend in your matplotlibrc file ('%s')
6767or with matplotlib.use()""" %
6868 (backend , matplotlib .matplotlib_fname ()))
69- def do_nothing (* args , ** kwargs ): pass
70- backend_version = getattr (backend_mod ,'backend_version' , 'unknown' )
69+
70+ def do_nothing (* args , ** kwargs ):
71+ pass
72+
73+ backend_version = getattr (backend_mod , 'backend_version' ,
74+ 'unknown' )
75+
7176 show = getattr (backend_mod , 'show' , do_nothing_show )
72- draw_if_interactive = getattr (backend_mod , 'draw_if_interactive' , do_nothing )
7377
74- matplotlib .verbose .report ('backend %s version %s' % (backend ,backend_version ))
78+ draw_if_interactive = getattr (backend_mod , 'draw_if_interactive' ,
79+ do_nothing )
80+
81+ matplotlib .verbose .report ('backend %s version %s' %
82+ (backend , backend_version ))
7583
7684 return backend_mod , new_figure_manager , draw_if_interactive , show
0 commit comments