summaryrefslogtreecommitdiff
path: root/gr-qtgui/examples/pyqt_const_c.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-11-06 14:28:22 -0500
committerTom Rondeau <trondeau@vt.edu>2012-11-06 14:40:43 -0500
commitfd110bdbbe8bc40781c34f33c70deec5b7931109 (patch)
treeef18e813add19b09c57cc21cb672ea602701405b /gr-qtgui/examples/pyqt_const_c.py
parent0c9c16fb008b02a5af39fb22e18acfff2dbd933a (diff)
analog: Removing reference to gr.sig_source_X and gr.noise_source_X where possible.
Passing make and make test. Examples and apps need testing. gr-filter relies on sig_source and noise_source, so can't remove them from core.
Diffstat (limited to 'gr-qtgui/examples/pyqt_const_c.py')
-rwxr-xr-xgr-qtgui/examples/pyqt_const_c.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/gr-qtgui/examples/pyqt_const_c.py b/gr-qtgui/examples/pyqt_const_c.py
index 125124ebc5..cf81aa120f 100755
--- a/gr-qtgui/examples/pyqt_const_c.py
+++ b/gr-qtgui/examples/pyqt_const_c.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -28,7 +28,13 @@ try:
from PyQt4 import QtGui, QtCore
import sip
except ImportError:
- print "Error: Program requires PyQt4 and gr-qtgui."
+ sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.exit(1)
+
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
sys.exit(1)
class dialog_box(QtGui.QWidget):
@@ -139,8 +145,8 @@ class my_top_block(gr.top_block):
self.qapp = QtGui.QApplication(sys.argv)
- src1 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f1, 0.5, 0)
- src2 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f2, 0.5, 0)
+ src1 = analog.sig_source_c(Rs, analog.GR_SIN_WAVE, f1, 0.5, 0)
+ src2 = analog.sig_source_c(Rs, analog.GR_SIN_WAVE, f2, 0.5, 0)
src = gr.add_cc()
channel = filter.channel_model(0.001)
thr = gr.throttle(gr.sizeof_gr_complex, 100*npts)