Readback IO Signature of Hier Block

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”.

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