diff options
author | Josh Morman <jmorman@perspectalabs.com> | 2019-08-30 09:47:42 -0400 |
---|---|---|
committer | devnulling <devnulling@users.noreply.github.com> | 2020-02-10 13:33:07 -0800 |
commit | 3232eeb534b5ac1ab503f7f36254227b1cfba1f9 (patch) | |
tree | c950d0e841644ed584737e905e315d778fe26f3e /grc/core/generator/top_block.py | |
parent | 838d081918f8e5ee3f28273237d8b74a8c0b9d9b (diff) |
grc: add python snippets to GRC
This feature adds the ability to insert arbitrary code into the python
flowgraph. It gives a little more low-level flexibility for quickly
modifying flowgraphs and adding custom bits of code rather than having
to go and edit the generated py file
One example is synchronizing multiple USRP objects - sometimes you want
different sync than what is offered in the multi-usrp object, so you can
put a bit of code in the snippet block to do the custom synchronization
Diffstat (limited to 'grc/core/generator/top_block.py')
-rw-r--r-- | grc/core/generator/top_block.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/grc/core/generator/top_block.py b/grc/core/generator/top_block.py index 27d2428888..bf7ebcc224 100644 --- a/grc/core/generator/top_block.py +++ b/grc/core/generator/top_block.py @@ -191,7 +191,7 @@ class TopBlockGenerator(object): blocks = [ b for b in fg.blocks - if b.enabled and not (b.get_bypassed() or b.is_import or b in parameters or b.key == 'options') + if b.enabled and not (b.get_bypassed() or b.is_import or b.is_snippet or b in parameters or b.key == 'options') ] blocks = expr_utils.sort_objects(blocks, operator.attrgetter('name'), _get_block_sort_text) |