[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Best way to share/install hierarchical grc blocks
From: |
Josh Blum |
Subject: |
Re: [Discuss-gnuradio] Best way to share/install hierarchical grc blocks? |
Date: |
Thu, 15 Mar 2012 14:35:49 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
On 03/15/2012 02:14 PM, Porges, Donald wrote:
> I've read that, and it only applies to telling grc where the xml is
> for a non-hierarchical block; that is, it solves a build-time
> problem, not a runtime problem.
>
>
> On Mar 15, 2012, at 5:07 PM, Tom Rondeau wrote:
>
> On Thu, Mar 15, 2012 at 3:28 PM, Porges, Donald
> <address@hidden<mailto:address@hidden>> wrote:
> Hi,
>
> I'm trying to figure out a good way to distribute some custom heir
> blocks that go with my low-level custom blocks I've written. The
> issue is that the xml and py files are both generated into my
> ~/.grc_gnuradio directory, and the xml files contain lines like
>
> execfile("/Users/myname/.grc_gnuradio/file.py")
>
Well, this is my doing, and I can't say I love it. The idea was that
user didnt need to set their PYTHONPATH.
This would be a code change, but it could be better replaced by "from
file import class". Here is the relevant line:
http://gnuradio.org/cgit/gnuradio.git/tree/grc/python/convert_hier.py#n39
I guess the additional thing is that the generated client code also
append os.path.join(os.expanduser('~'), '.grc_gnuradio') to the
sys.path, so the imports would still work when the PYTHONPATH env var
isnt set.
-josh