Hi Cinaed,

Thanks for the pointer. This is what I found:

- in qa_polar_encoder_systematic.py we have
import fec_swig as fec
from extended_encoder import extended_encoder

- in extended_encoder.py we have
import fec_swig as fec

I assume that people use the extended_encoder from their own code (or
from GRC), so I would have just used "import fec" within the
extended_encoder.py. It seems that I do not fully understand the
difference between "import xxx" and "import xxx_swig", I thought that
the later is only for debugging, but apparently it includes only the
cpp wrappers.

So in an xxx OOT module I should always import xxx_swig (and never
import xxx) and import python files by name if I want to use other
hierarchical modules. Is this accurate?

Best,
Miklos


On Mon, Jun 19, 2017 at 11:40 PM, Cinaed Simson <cinaed.sim...@gmail.com> wrote:
> On 06/19/2017 01:22 PM, Miklos Maroti wrote:
>> Hello,
>>
>> I have a simple question: I would like to write QA code for a
>> hierarchical python block. That hierarchical block uses cpp blocks
>> from the same out of tree module. The python code for the hierarchical
>> block imports the xxx module, but that is not available in QA code
>> yet, and in other places we import xxx_swig as xxx instead. However
>> this is not going to work, I cannot put this into the hierarchical
>> block code. Is there a good (standard) way to write QA code that works
>> before the module is installed?
>>
>> Best,
>> Miklos
>
> I think I might know what you mean - I've never done it myself - but
> I've been confused by trying to turn the qa python scripts in the source
> directory.
>
> If you still have build directory for gnuradio, take a look at the shell
> scripts in
>
>   ./src/gnuradio-3.7.11/build/gr-fec/python/fec
>
> -- Cinaed
>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> Discuss-gnuradio@gnu.org
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to