Adding a python block

Hello everyone,

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

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl

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 “tx.py”, line 94, in
modulator = d16psk.d16psk_mod( # continued on next
line…
NameError: name ‘d16psk’ is not defined

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

Thanks for any help,
Devin

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

This would only work if each one of those tokens was actual a python
module/package with an init.py 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(…)

-Josh