Can not import digital_swig for the example of pkt.py

I am using the this example to test the installed next branch of josh:

http://gnuradio.org/cgit/jblum.git/tree/gr-digital/python/pkt2.py?h=next

How ever, the digital_swig is not recognized. And I also checked the
changeset at
http://gnuradio.org/redmine/projects/gnuradio/wiki/ChangeSets

Nothing related is found.

Traceback (most recent call last):
File “./pkt2.py”, line 23, in
import digital_swig
ImportError: No module named digital_swig

Can someone tell me where to find this package now?

Alex,
Dreams can come true just believe.

On Tue, Nov 29, 2011 at 1:40 AM, Alex Z. [email protected]
wrote:

File “./pkt2.py”, line 23, in
import digital_swig
ImportError: No module named digital_swig

Can someone tell me where to find this package now?

Alex,
Dreams can come true just believe.

It looks like you have some left-over code laying around. The pkt2.py is
gone and we use pkt.py now, instead. Something must have gotten left
behind
with a checkout or merge at some point.

As for the digital_swig, that’s the “real” name of the SWIG’d-up
gr-digital
module that we export into digital. The internal gr-digital python
modules
use digital_swig, though.

Make sure you’ve cleaned up previous installs, to a git clean -dxf in
your
gnuradio checkout and reinstall. Hopefully that’ll fix your problems.

Tom

Just found the digital_swig.py is located
at /usr/local/lib/python2.7/dist-packages/gnuradio/digital
So I change “import digital_swig” to “from gnuradio.digital import
digital_swig” and the complaining disappeared. Seems for these python
modules, i still need to give a full path, even I have imported the
gnuradio, gnuradio.digital in the beginning of the code.

On Tue, Nov 29, 2011 at 9:57 AM, Tom R. [email protected]
wrote:

Dreams can come true just believe.

Make sure you’ve cleaned up previous installs, to a git clean -dxf in your
gnuradio checkout and reinstall. Hopefully that’ll fix your problems.

Tom

Alex,
Dreams can come true just believe.

On 11/29/2011 01:40 AM, Alex Z. wrote:

Traceback (most recent call last):
File “./pkt2.py”, line 23, in
import digital_swig
ImportError: No module named digital_swig

Can someone tell me where to find this package now?

Here is my digital python directory, what is yours missing that mine
has?

On 11/29/2011 10:57 AM, Tom R. wrote:

Dreams can come true just believe.

It looks like you have some left-over code laying around. The pkt2.py is
gone and we use pkt.py now, instead. Something must have gotten left behind
with a checkout or merge at some point.

Sorry for the correction, pkt2 is my doing. I re-implemented pkt.py with
message passing capabilities.

As for the digital_swig, that’s the “real” name of the SWIG’d-up gr-digital
module that we export into digital. The internal gr-digital python modules
use digital_swig, though.

Make sure you’ve cleaned up previous installs, to a git clean -dxf in your
gnuradio checkout and reinstall. Hopefully that’ll fix your problems.

I think Alex is importing pkt2.py from in-tree and not from an installed
location.

-josh

Hi Josh,

I have no d8psk*, dbpsk*, modulation_utils2*.
Which branch do you use for this?

On Tue, Nov 29, 2011 at 1:30 PM, Josh B. [email protected] wrote:

cpm.py digital_swig.pyo modulation_utils2.py
ofdm_sync_ml.pyc pkt2.pyo qpsk.pyc


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Alex,
Dreams can come true just believe.

On Tue, Nov 29, 2011 at 4:18 PM, Alex Z. [email protected]
wrote:

Hi Josh,

I have no d8psk*, dbpsk*, modulation_utils2*.
Which branch do you use for this?

The dXpsk blocks have been replaced with Xpsk modulators that allow both
differential and non-differential with a flag to turn it on and off
(should
be on by default), and modulation_utils2 (unless Josh reintroduced that,
too) is now must modulation_utils.

I updated the ChangeSets wiki page to mention this explicitly:
http://gnuradio.org/redmine/projects/gnuradio/wiki/ChangeSets

Tom

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs