discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Change Hierarchical Blocks Import Method?


From: Adeel Anwar
Subject: Re: [Discuss-gnuradio] Change Hierarchical Blocks Import Method?
Date: Sat, 15 Jun 2013 01:02:53 -0700

Dan,
You can define custom path in /.gnuradio/config.conf OR export path to GRC_BLOCKS_PATH environment variable. See
http://gnuradio.org/redmine/projects/gnuradio/wiki/GNURadioCompanion#Installing-the-XML-Block-Definition

-Adeel


On Fri, Jun 14, 2013 at 8:22 PM, Dan CaJacob <address@hidden> wrote:
Would it be possible to change the way hierarchical blocks get imported?

Currently, they get called by execfile with their absolute file path, which makes sharing them brittle.  Since hierarchical blocks are expected to be in the .grc_gnuradio folder, would it be possible to add that to the PYTHONPATH (if it is not already) and treat the Hier blocks as modules in a Python Package like HierBlocks?  That way, importing a Hier block could be done like:

from HierBlocks import myHierBlock

GRC could generate import statements like the above instead of the current execfile, which is system/user specific.

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]