summaryrefslogtreecommitdiff
path: root/gr-utils/src/python/usrp_rx_cfile.py
diff options
context:
space:
mode:
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>2007-09-18 18:59:00 +0000
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>2007-09-18 18:59:00 +0000
commite692e71305ecd71d3681fe37f3d76f350d67e276 (patch)
treedc320c9261303aa9a92f4d12bdba85f82720d1bf /gr-utils/src/python/usrp_rx_cfile.py
parent6ad04a094ced626e46c210b9847eae46a1ae8e67 (diff)
Merge r6461:6464 from jcorgan/t162-staging into trunk.
* Final gr.top_block and gr.hier_block2 implementation inside gnuradio-core/src/lib/runtime * Implementation of gr.hier_block2 versions of all the old-style blocks in blks. These live in blks2. * Addition of gr.hier_block2 based versions of gr-wxgui blocks * Conversion of all the example code in gnuradio-examples to use this new code * Conversion of all the gr-utils scripts to use the new code The OFDM examples and related hierarchical blocks have not yet been converted. Code in the rest of the tree that is outside the core and example components has also not yet been converted. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6466 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-utils/src/python/usrp_rx_cfile.py')
-rwxr-xr-xgr-utils/src/python/usrp_rx_cfile.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gr-utils/src/python/usrp_rx_cfile.py b/gr-utils/src/python/usrp_rx_cfile.py
index 306e101d35..23a7a94d8c 100755
--- a/gr-utils/src/python/usrp_rx_cfile.py
+++ b/gr-utils/src/python/usrp_rx_cfile.py
@@ -11,11 +11,12 @@ from gnuradio import audio
from gnuradio import usrp
from gnuradio.eng_option import eng_option
from optparse import OptionParser
+import sys
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
def __init__(self):
- gr.flow_graph.__init__(self)
+ gr.top_block.__init__(self)
usage="%prog: [options] output_filename"
parser = OptionParser(option_class=eng_option, usage=usage)
@@ -99,9 +100,12 @@ class my_graph(gr.flow_graph):
sys.stderr.write('Failed to set frequency\n')
raise SystemExit, 1
+ def __del__(self):
+ # Avoid weak reference error
+ del self.subdev
if __name__ == '__main__':
try:
- my_graph().run()
+ my_top_block().run()
except KeyboardInterrupt:
pass