# Python OOT Block on Windows

**URL:** <https://www.ruby-forum.com/t/python-oot-block-on-windows/232059>\
**Category:** GNU Radio\
**Created:** [September 16, 2014, 12:40pm UTC](https://www.ruby-forum.com/t/python-oot-block-on-windows/232059 "2014-09-16T12:40:20Z")\
**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:** [September 16, 2014, 12:40pm UTC](https://www.ruby-forum.com/t/python-oot-block-on-windows/232059/1 "2014-09-16T12:40:20Z")

</div>

Hi,

Is it possible to create an OOT module written in Python to run on  
windows without having to compile anything? I am hoping that I can drop  
a Python file and a GRC file somewhere and have them just run, seeing as  
Python does not need to compile anything.

I have GNU Radio installed with the Ettus binaries, so I am not using  
MinGW to compile from source and can’t compile new blocks using MinGW.

Thanks,  
Luke

---

<div class="post-metadata">

**Author:** ![PEEL\_Luke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9fc29f/32.png) [@PEEL\_Luke](https://www.ruby-forum.com/u/PEEL_Luke)\
**Post date:** [September 16, 2014, 12:53pm UTC](https://www.ruby-forum.com/t/python-oot-block-on-windows/232059/2 "2014-09-16T12:53:54Z")

</div>

Hi Luke,  
Well, yesno. If your python file stands alone, putting it somewhere  
python will find it suffices, and there are standard directories to just  
drop your xml file defining the GRC block representing that block.  
Since 3.7.1 (I thiiiiink…) pure-Python OOTs work well without having  
ever been touched by a compiler. Note though that the whole installation  
routine depends heavily on the standard GNU Radio build environment,  
which will make it a bit hard to actually work without a compiler, or  
CMake. Personally, if you can, try to set up a proper development  
environment [1]-- it will come in really handy if you decide you want to  
build the latest GNU Radio yourself later on or if your signal  
processing needs demand C++ blocks at one point.

Greetings,  
Marcus

[1] an easy way to try a system where most (if not all initially  
desirable) components are already set up is the live DVD –  
[http://gnuradio.org/redmine/news/43](http://gnuradio.org/redmine/news/43)

---

<div class="post-metadata">

**Author:** ![PEEL\_Luke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9fc29f/32.png) [@PEEL\_Luke](https://www.ruby-forum.com/u/PEEL_Luke)\
**Post date:** [September 16, 2014, 2:12pm UTC](https://www.ruby-forum.com/t/python-oot-block-on-windows/232059/3 "2014-09-16T14:12:58Z")

</div>

Thanks Marcus,

So I have a Python file that I created using the gr\_modtool and tried to  
run it, but I get an import error:

Traceback (most recent call last):  
File “C:.… …\top\_block.py”, line 15, in   
import custom  
ImportError: No module named custom

Do I need to add anything to the Python file (or remove anything from  
the top\_block.py file) to allow it to run standalone?

Thanks,  
Luke

Sent: 16 September 2014 11:52  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Discuss-gnuradio] Python OOT Block on Windows

Hi Luke,  
Well, yesno. If your python file stands alone, putting it somewhere  
python will find it suffices, and there are standard directories to just  
drop your xml file defining the GRC block representing that block.  
Since 3.7.1 (I thiiiiink…) pure-Python OOTs work well without having  
ever been touched by a compiler. Note though that the whole installation  
routine depends heavily on the standard GNU Radio build environment,  
which will make it a bit hard to actually work without a compiler, or  
CMake. Personally, if you can, try to set up a proper development  
environment [1]-- it will come in really handy if you decide you want to  
build the latest GNU Radio yourself later on or if your signal  
processing needs demand C++ blocks at one point.

Greetings,  
Marcus

[1] an easy way to try a system where most (if not all initially  
desirable) components are already set up is the live DVD –  
[http://gnuradio.org/redmine/news/43](http://gnuradio.org/redmine/news/43)  
On 16.09.2014 12:38, PEEL Luke wrote:

Hi,

Is it possible to create an OOT module written in Python to run on  
windows without having to compile anything? I am hoping that I can drop  
a Python file and a GRC file somewhere and have them just run, seeing as  
Python does not need to compile anything.

I have GNU Radio installed with the Ettus binaries, so I am not using  
MinGW to compile from source and can’t compile new blocks using MinGW.

Thanks,

Luke

* * *

Discuss-gnuradio mailing list

removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)
