Python Snippet

Insert a snippet of Python code directly into the flowgraph at the end of the specified section.

CAUTION: This is an ADVANCED feature and can lead to unintended consequences in the rendering of a flowgraph. Use at your own risk.

For each snippet a function is generated with the block name of the snippet (use GRC Show Block IDs option to modify). These functions are then grouped into their respective sections in the rendered flowgraph.

The purpose of the python snippets is to be able to exercise features from within GRC that are not entirely supported by the block callbacks, methods and mechanisms to generate the code. One example of this would be calling UHD timed commands before starting the flowgraph

Indents will be handled upon insertion into the python flowgraph.

epy_mod_0.some_function(self.some_block.some_property)
 * Example 1:

Will place the function call in the generated .py file using the name of the appropriate embedded python block in the proper scope The scope is relative to the blocks in the flowgraph, e.g. to reference a block, it should be identified as self.block

print('The flowgraph has been stopped')
 * Example 2:

With section selected as 'Main - After Stop', will place the print statement after the flowgraph has been stopped.

Parameters
(R): Run-time adjustable


 * Section of Flowgraph
 * options: ['Main - After Init', 'Main - After Start', 'Main - After Stop']


 * Priority
 * priority within the section; larger number is higher priority


 * Code Snippet
 * content of code

Source Files

 * C++ files
 * TODO


 * Header files
 * TODO


 * Public header files
 * TODO


 * Block definition
 *