summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorJosh Blum2013-02-24 14:40:26 -0800
committerJosh Blum2013-02-24 14:40:26 -0800
commit7233e7c2dd2c0cba1a998cdd5b3ad7f76816e9dd (patch)
tree9c7d58203fded156d1002acce20d923ef7b0d776 /gnuradio-core
parentdf9bcf4297f0da202d28f9cdf1efd5bf8167d719 (diff)
downloadgnuradio-7233e7c2dd2c0cba1a998cdd5b3ad7f76816e9dd.tar.gz
gnuradio-7233e7c2dd2c0cba1a998cdd5b3ad7f76816e9dd.tar.bz2
gnuradio-7233e7c2dd2c0cba1a998cdd5b3ad7f76816e9dd.zip
gras: move python hier/top wrappers into init.py
This also addresses a holdover bug from the last commit
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/python/gnuradio/gr/__init__.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/__init__.py b/gnuradio-core/src/python/gnuradio/gr/__init__.py
index 66d57f77a..b274f8305 100644
--- a/gnuradio-core/src/python/gnuradio/gr/__init__.py
+++ b/gnuradio-core/src/python/gnuradio/gr/__init__.py
@@ -30,8 +30,25 @@ from exceptions import *
#from top_block import *
from gateway import basic_block, sync_block, decim_block, interp_block
-from gras import HierBlock as hier_block2
-from gras import TopBlock as top_block
+import gras
+
+class top_block(gras.TopBlock):
+ def __init__(self, name="Top"):
+ gras.TopBlock.__init__(self, name)
+
+class hier_block2(gras.HierBlock):
+ def __init__(self, name="Hier", in_sig=None, out_sig=None):
+ gras.HierBlock.__init__(self, name)
+
+ self.__in_sig = in_sig
+ self.__out_sig = out_sig
+
+ #backwards compatible silliness
+ import weakref
+ self._hb = weakref.proxy(self)
+
+ def input_signature(self): return self.__in_sig
+ def output_signature(self): return self.__out_sig
# create a couple of aliases
serial_to_parallel = stream_to_vector