diff options
author | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-01-30 22:28:15 +0000 |
---|---|---|
committer | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-01-30 22:28:15 +0000 |
commit | c2c1ba21350d588adb4ec8f2f815f50df81927f8 (patch) | |
tree | df7b85f974521ef7df68f7d33e4c6eecd9835039 /gnuradio-core/src/utils/gr_plot_data.py | |
parent | f52a5932f178e474b625e86fb85c1c8954334398 (diff) |
Catching ImportError exception and giving (hopefully) useful error message to install the necessary packages.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7529 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/utils/gr_plot_data.py')
-rwxr-xr-x | gnuradio-core/src/utils/gr_plot_data.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gnuradio-core/src/utils/gr_plot_data.py b/gnuradio-core/src/utils/gr_plot_data.py index f0c2436bdf..abc210c08a 100755 --- a/gnuradio-core/src/utils/gr_plot_data.py +++ b/gnuradio-core/src/utils/gr_plot_data.py @@ -20,8 +20,18 @@ # Boston, MA 02110-1301, USA. # -import scipy -from pylab import * +try: + import scipy +except ImportError: + print "Please install SciPy to run this script (http://www.scipy.org/)" + raise SystemExit, 1 + +try: + from pylab import * +except ImportError: + print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)" + raise SystemExit, 1 + from optparse import OptionParser matplotlib.interactive(True) |