From c825caf1a86c5cefd20fdd222d915011ef43fbae Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 23 Sep 2011 17:21:39 -0400 Subject: examples: fixed import statements. --- gnuradio-examples/python/ofdm/gr_plot_ofdm.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/gnuradio-examples/python/ofdm/gr_plot_ofdm.py b/gnuradio-examples/python/ofdm/gr_plot_ofdm.py index e3b347189..b24855148 100755 --- a/gnuradio-examples/python/ofdm/gr_plot_ofdm.py +++ b/gnuradio-examples/python/ofdm/gr_plot_ofdm.py @@ -20,14 +20,24 @@ # Boston, MA 02110-1301, USA. # -import scipy, pylab, math -import struct, sys -from pylab import * -from matplotlib.font_manager import fontManager, FontProperties +import math, struct, sys from optparse import OptionParser -from scipy import fftpack from math import log10 +try: + import scipy + from scipy import fftpack +except ImportError: + print "Error: Program requires scipy (see: www.scipy.org)." + sys.exit(1) + +try: + from pylab import * + from matplotlib.font_manager import fontManager, FontProperties +except ImportError: + print "Error: Program requires matplotlib (see: matplotlib.sourceforge.net)." + sys.exit(1) + matplotlib.interactive(True) matplotlib.use('TkAgg') -- cgit