Adding a python block

Hello everyone,

I took the modulator and tweaked it a little to make a
modulator. I have (both of them) in


I ran
$sudo make install
$make check

Yet my script still gets an error on this line

modulator = gnuradio.blks2impl.d16psk.d16psk_mod(…)

I import like this

import gnuradio.blks2impl

The error says

Traceback (most recent call last):
File “”, line 94, in
modulator = d16psk.d16psk_mod( # continued on next
NameError: name ‘d16psk’ is not defined

I know the script works as it works when I copy to my the same
directory and change the import line. What do I have to do to install
block I wrote?

Thanks for any help,

modulator = gnuradio.blks2impl.d16psk.d16psk_mod(…)

This would only work if each one of those tokens was actual a python
module/package with an in it. But since its not, you have to
treat it like a directory structure:

from gnuradio.blks2impl.d16psk import d16psk_mod

modulator = d16psk_mod(…)