# Import block

**URL:** <https://www.ruby-forum.com/t/import-block/232651>\
**Category:** GNU Radio\
**Created:** [October 20, 2014, 3:49pm UTC](https://www.ruby-forum.com/t/import-block/232651 "2014-10-20T15:49:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 20, 2014, 3:49pm UTC](https://www.ruby-forum.com/t/import-block/232651/1 "2014-10-20T15:49:14Z")

</div>

Hi,

I am a new user of GNURadio and I am interested in use the Import block,  
to  
import the PSK.PY file, according to a tutorial that I am reading.

The problem is that file doesn’ t exists in the file sytem of my  
GNURADIO.  
When I try to paste it (after download the file from the page of  
GNURadio),  
the block still not work because the Gnuradio doesn’t catch the file.  
(with  
others file on the same folder it works fine).

Could someone help me? What I have to do?

Thanks !  
Regards,

_Fernando L. Rodríguez Brizuela -_

---

<div class="post-metadata">

**Author:** ![Fernando\_RodrS\_guez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@Fernando\_RodrS\_guez](https://www.ruby-forum.com/u/Fernando_RodrS_guez)\
**Post date:** [October 20, 2014, 5:43pm UTC](https://www.ruby-forum.com/t/import-block/232651/2 "2014-10-20T17:43:30Z")

</div>

Fernando,

Set the PYTHONPATH environment variable to include the location of the  
file you want to import, then re-run gnuradio-companion (or the  
generated Python file). In bash:

export PYTHONPATH=$PYTHONPATH:/some/other/directory

Then you can put ‘import psk’ in an Import block.

- Jeff

---

<div class="post-metadata">

**Author:** ![Fernando\_RodrS\_guez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@Fernando\_RodrS\_guez](https://www.ruby-forum.com/u/Fernando_RodrS_guez)\
**Post date:** [October 20, 2014, 5:51pm UTC](https://www.ruby-forum.com/t/import-block/232651/3 "2014-10-20T17:51:14Z")

</div>

On 10/20/2014 03:42 PM, Jeff L. wrote:

> - Jeff  
> Also, if you can say what tutorial you’re reading, it would help. If  
> you’re referring to the built-in psk.py, you would use something like:

from gnuradio.digital import psk

Maybe the tutorial is old and you’re using a newer version of GNU Radio?

- Jeff
