From e692e71305ecd71d3681fe37f3d76f350d67e276 Mon Sep 17 00:00:00 2001 From: jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> Date: Tue, 18 Sep 2007 18:59:00 +0000 Subject: 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 --- gr-utils/src/python/usrp_rx_cfile.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gr-utils/src/python/usrp_rx_cfile.py') 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 -- cgit v1.2.3