diff --git a/IPython/Release.py b/IPython/Release.py index a6b5db0..c9be0c9 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Release data for the IPython project. -$Id: Release.py 605 2005-06-09 14:09:03Z fperez $""" +$Id: Release.py 634 2005-07-17 01:56:45Z tzanko $""" #***************************************************************************** # Copyright (C) 2001-2005 Fernando Perez @@ -19,7 +19,7 @@ name = 'ipython' # For versions with substrings (like 0.6.7_rc1), use _ but NOT -, since # bdist_rpm chokes on dashes in the version string. -version = '0.6.16_cvs' +version = '0.6.16_svn' description = "An enhanced interactive Python shell." diff --git a/IPython/Shell.py b/IPython/Shell.py index 6e95fed..0637c4c 100644 --- a/IPython/Shell.py +++ b/IPython/Shell.py @@ -4,7 +4,7 @@ All the matplotlib support code was co-developed with John Hunter, matplotlib's author. -$Id: Shell.py 605 2005-06-09 14:09:03Z fperez $""" +$Id: Shell.py 634 2005-07-17 01:56:45Z tzanko $""" #***************************************************************************** # Copyright (C) 2001-2004 Fernando Perez @@ -400,15 +400,6 @@ class MatplotlibShellBase: self.mpl_use._called = True self.matplotlib = matplotlib - - # Take control of matplotlib's error handling, which can normally - # lock up the python interpreter when raw_input() is called - import matplotlib.backends as backend - backend.error_msg = error - - # we'll handle the mainloop, tell show not to - import matplotlib.backends - matplotlib.backends.show._needmain = False self.mpl_backend = matplotlib.rcParams['backend'] # we also need to block switching of interactive backends by use() @@ -417,9 +408,6 @@ class MatplotlibShellBase: # overwrite the original matplotlib.use with our wrapper matplotlib.use = use - # We need to detect at runtime whether show() is called by the user. - # For this, we wrap it into a decorator which adds a 'called' flag. - backend.draw_if_interactive = flag_calls(backend.draw_if_interactive) # This must be imported last in the matplotlib series, after # backend/interactivity choices have been made @@ -432,6 +420,11 @@ class MatplotlibShellBase: self.pylab = matlab self.pylab_name = 'matlab' + self.pylab.show._needmain = False + # We need to detect at runtime whether show() is called by the user. + # For this, we wrap it into a decorator which adds a 'called' flag. + self.pylab.draw_if_interactive = flag_calls(self.pylab.draw_if_interactive) + # Build a user namespace initialized with matplotlib/matlab features. user_ns = {'__name__':'__main__', '__builtins__' : __builtin__ }