]> git.gag.com Git - debian/gnuradio/commitdiff
Catching ImportError exception and giving (hopefully) useful error message to install...
authortrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 30 Jan 2008 22:28:15 +0000 (22:28 +0000)
committertrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 30 Jan 2008 22:28:15 +0000 (22:28 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7529 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-core/src/utils/gr_plot_char.py
gnuradio-core/src/utils/gr_plot_const.py
gnuradio-core/src/utils/gr_plot_data.py
gnuradio-core/src/utils/gr_plot_fft_c.py
gnuradio-core/src/utils/gr_plot_fft_f.py
gnuradio-core/src/utils/gr_plot_float.py
gnuradio-core/src/utils/gr_plot_int.py
gnuradio-core/src/utils/gr_plot_iq.py
gnuradio-core/src/utils/gr_plot_short.py

index d7bde8d00b320c0dcf8715bac562472bc6a98b74..71ff4499ae5bc7925a623ac41a720713bb9a6216 100755 (executable)
 # Boston, MA 02110-1301, USA.
 # 
 
-import scipy
+try:
+    import scipy
+except ImportError:
+    print "Please install SciPy to run this script (http://www.scipy.org/)"
+    raise SystemExit, 1
+
 from optparse import OptionParser
 from gr_plot_data import plot_data
 
index 9ec75ddb9a1a5cf9ce8d24235c04d8c10e8a2473..1503363bd5c84ef06b44cf469e113e3d1a01b7cb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
 # Boston, MA 02110-1301, USA.
 # 
 
-import scipy
-from pylab import *
-from matplotlib.font_manager import fontManager, FontProperties
+try:
+    import scipy
+except ImportError:
+    print "Please install SciPy to run this script (http://www.scipy.org/)"
+    raise SystemExit, 1
+
+try:
+    from pylab import *
+    from matplotlib.font_manager import fontManager, FontProperties
+except ImportError:
+    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
+    raise SystemExit, 1
+
 from optparse import OptionParser
 
 matplotlib.interactive(True)
index f0c2436bdfaf3b33fcf537933e72d9c4b9c4d43b..abc210c08accfc02f03b6a8a0d7db30703e771cf 100755 (executable)
 # 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)
index af21a8fea14cd28145b568d9e1043108533d98b8..702840401c796bf8145d6f694c58179c67691457 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
 # Boston, MA 02110-1301, USA.
 # 
 
-import scipy
-from pylab import *
+try:
+    import scipy
+    from scipy import fftpack
+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
-from scipy import fftpack
 from math import log10
 
 matplotlib.interactive(True)
index 5825c4ebcfacce0222b3f6ff2708c353fecfd628..bb16529140f08086394887764c341d076c0515aa 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
 # Boston, MA 02110-1301, USA.
 # 
 
-import scipy
-from pylab import *
+try:
+    import scipy
+    from scipy import fftpack
+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
-from scipy import fftpack
 from math import log10
 
 matplotlib.interactive(True)
index d49a00594f76e9645ba2d2169b509e1798c8206a..248a84b85a28033be1719ae98a60a776a0c494c5 100755 (executable)
 # Boston, MA 02110-1301, USA.
 # 
 
-import scipy
+try:
+    import scipy
+except ImportError:
+    print "Please install SciPy to run this script (http://www.scipy.org/)"
+    raise SystemExit, 1
+
 from optparse import OptionParser
 from gr_plot_data import plot_data
 
index 3eb36011df444ce1bca96439ea5422e1b32ffe0f..86ecbce7d7e1d305875868b2e83f4470dd17567e 100755 (executable)
 # Boston, MA 02110-1301, USA.
 # 
 
-import scipy
+try:
+    import scipy
+except ImportError:
+    print "Please install SciPy to run this script (http://www.scipy.org/)"
+    raise SystemExit, 1
+
 from optparse import OptionParser
 from gr_plot_data import plot_data
 
index 1752615618905111705d879ba9455136fee02166..f1f1c10526cbdff1b4345c35754beba3ea74fcb0 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
 # 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)
index ea7092b10a3a345ac614e0932b3b78bd73208106..399c0aab9cf1e4c3dc643941e26b25c3d2f10b56 100755 (executable)
 # Boston, MA 02110-1301, USA.
 # 
 
-import scipy
+try:
+    import scipy
+except ImportError:
+    print "Please install SciPy to run this script (http://www.scipy.org/)"
+    raise SystemExit, 1
+
 from optparse import OptionParser
 from gr_plot_data import plot_data