diff options
author | Tom Rondeau <trondeau@molly.home> | 2009-08-25 10:01:00 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@molly.home> | 2009-08-25 10:01:00 -0400 |
commit | be584380504e24f7841b4792290b9cb3bb52aed4 (patch) | |
tree | 1064e1f6fec53c9377ac27c189e5baf4ac0acfe4 /gr-utils | |
parent | ebe5f1cacefd3b4b2c35adfd6a38b7fac387680b (diff) |
User messages if PyQt and PyQwt are not installed (or found).
Diffstat (limited to 'gr-utils')
-rwxr-xr-x | gr-utils/src/python/gr_filter_design.py | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/gr-utils/src/python/gr_filter_design.py b/gr-utils/src/python/gr_filter_design.py index 4fbe6e34c8..1253056b5b 100755 --- a/gr-utils/src/python/gr_filter_design.py +++ b/gr-utils/src/python/gr_filter_design.py @@ -1,5 +1,9 @@ #!/usr/bin/env python +import sys, os +from optparse import OptionParser +from gnuradio import gr, blks2, eng_notation + try: import scipy from scipy import fftpack @@ -7,14 +11,24 @@ except ImportError: print "Please install SciPy to run this script (http://www.scipy.org/)" raise SystemExit, 1 -import sys, os -from PyQt4 import Qt, QtCore, QtGui -import PyQt4.Qwt5 as Qwt -from optparse import OptionParser -from gnuradio import gr, blks2, eng_notation -from scipy import fftpack +try: + from PyQt4 import Qt, QtCore, QtGui +except ImportError: + print "Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)" + raise SystemExit, 1 + +try: + import PyQt4.Qwt5 as Qwt +except ImportError: + print "Please install PyQwt5 to run this script (http://pyqwt.sourceforge.net/)" + raise SystemExit, 1 + +try: + from pyqt_filter import Ui_MainWindow +except ImportError: + print "Could not import from pyqt_filter. Please build with \"pyuic4 pyqt_filter.ui -o pyqt_filter.py\"" + raise SystemExit, 1 -from pyqt_filter import Ui_MainWindow class gr_plot_filter(QtGui.QMainWindow): def __init__(self, qapp, options): |