# Readback IO Signature of Hier Block

**URL:** <https://www.ruby-forum.com/t/readback-io-signature-of-hier-block/231307>\
**Category:** GNU Radio\
**Created:** [August 2, 2014, 2:06am UTC](https://www.ruby-forum.com/t/readback-io-signature-of-hier-block/231307 "2014-08-02T02:06:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [August 2, 2014, 2:06am UTC](https://www.ruby-forum.com/t/readback-io-signature-of-hier-block/231307/1 "2014-08-02T02:06:50Z")

</div>

Is there, or will there ever be a method to read back the io\_signature  
of a  
heir block in python? I’d like to do some pythonic stuff to easily wrap  
multiple hier blocks in a number of separate flowgraphs without  
requiring  
the developer to specify the io signature of each block.

-John

PS - I’m very sorry for using the word “pythonic”.

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [August 2, 2014, 6:52pm UTC](https://www.ruby-forum.com/t/readback-io-signature-of-hier-block/231307/2 "2014-08-02T18:52:31Z")

</div>

Hi John,

I’m a little confused; as far as I know, hier\_block2s don’t allow you to  
set a variable range of in/outputs. Thus, initialization via a  
hier\_block2. **init** call must set definite io\_signatures, and you can  
get them using .input\_signature() / .output\_signature()  
def **init** (self, in\_sig, out\_sig):  
gr.hier\_block2. **init** (self,  
“iosig\_wise”,  
in\_sig, out\_sig)

Now, since that signature is hard-coded, I don’t really see the case  
where the runtime iosigs would differ from these set at initialization,  
but I’m not sure I’m not missing something.

But that’s a little theoretical, so let’s talk about something specific;  
does [1]'s python/qa\_iosig\_wise.py achieve what you would want to have?

Greetings,  
Marcus

[1][GitHub - marcusmueller/gr-scrap\_iosig: qa for using input\_signature() / output\_signature() on a gr.hier\_block2 in python](https://github.com/marcusmueller/gr-scrap_iosig)
