summaryrefslogtreecommitdiff
path: root/grc/python/flow_graph.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'grc/python/flow_graph.tmpl')
-rw-r--r--grc/python/flow_graph.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index a0de5d12bd..41ab67ce5a 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -48,13 +48,15 @@ if __name__ == '__main__':
########################################################
##Create Imports
########################################################
-#if any("GRC_HIER_PATH" in imp for imp in $imports)
+#if any(imp.endswith("# grc-generated hier_block") for imp in $imports)
import os
-GRC_HIER_PATH = os.environ.get('GRC_HIER_PATH', os.path.expanduser('~/.grc_gnuradio'))
+import sys
+#set imports = $filter(lambda i: i not in ("import os", "import sys"), $imports)
+sys.path.append(os.environ.get('GRC_HIER_PATH', os.path.expanduser('~/.grc_gnuradio')))
#end if
#for $imp in $imports
-$imp
+$(imp.replace(" # grc-generated hier_block", ""))
#end for
########################################################