I have a couple of blocks and a flow graph that uses them. When I
generate
the flow graph of a block using GNU Radio Companion, the Python script
is
generated at ~/.grc_gnuradio/block1.py
The same thing happens with the flow graph but, in addition, the call to
my
blocks inside the generated Python script looks like this:
execfile("/home/myuser/.grc_gnuradio/block1.py")
Which means that when I copy these scripts to the target machine I need
to
edit that line to match the location of the block1.py in the target
machine.
How can I edit the location where GNU Radio Companion puts the scripts?
The
Edit > Properties menu is disabled
Which means that when I copy these scripts to the target machine I need to
edit that line to match the location of the block1.py in the target machine.
How can I edit the location where GNU Radio Companion puts the scripts?
The Edit > Properties menu is disabled
Thanks,
Murray
The Properties menu item is there more for future use but doesn’t yet do
anything. In our current work to overhaul GRC to make it more
user-friendly, I hope these are things we can more easily set and
change.
In the meantime, you can control the location of the output of the
hier_blocks by setting the environmental variable GRC_HIER_PATH. This
will
allow you to build and install the .py and .py.xml files into whatever
path
you want, and that execfile sring will similarly point there. One way to
handle this is:
Thanks for your answer Tom and sorry for the delay replying to you.
I tried setting the environment variable GRC_HIER_PATH but it didn’t
make
any difference. I also tried setting
GRC_PREFS_PATH
GRC_BLOCKS_PATH
HIER_BLOCKS_LIB_DIR
But my grc companion 3.7.6.1 keeps compiling the blocks to
~/.grc_gnuradio
Can you think of anything else I could try?
I’ve tried with Ubuntu 12.04 and Ubuntu 14.04.
But my grc companion 3.7.6.1 keeps compiling the blocks to > ~/.grc_gnuradio Can
you think of
anything else I could try? I’ve > tried with Ubuntu 12.04 and Ubuntu
14.04.
I created an issue [1] for this. I came up with two different solutions.
Feadback welcome.