]> git.gag.com Git - debian/gnuradio/commitdiff
template simplify
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 21 Jan 2009 22:43:57 +0000 (22:43 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 21 Jan 2009 22:43:57 +0000 (22:43 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10281 221aa14e-8319-0410-a670-987f0aec2ac5

grc/data/platforms/python/flow_graph.tmpl

index 98feb4a95a2e013850942f8dd7a8ec64af455c9f..a5fbc64b4d95edd20d71ddce6ead3a0e18f0f055 100644 (file)
 #set $DIVIDER = '#'*50
 $DIVIDER
 # Gnuradio Python Flow Graph
-$('# Title: %s'%$flow_graph.get_option('title'))
-$('# Author: %s'%$flow_graph.get_option('author'))
-$('# Description: %s'%$flow_graph.get_option('description'))
-$('# Generated: %s'%time.ctime())
+# Title: $flow_graph.get_option('title')
+# Author: $flow_graph.get_option('author')
+# Description: $flow_graph.get_option('description')
+# Generated: $time.ctime()
 $DIVIDER
 
 ########################################################
@@ -126,7 +126,7 @@ class $(class_name)(gr.hier_block2):
 #end if
 #for $blk in filter(lambda b: b.get_make(), $blocks)
        #set $code = '\n\t\t'.join($blk.get_make().splitlines())
-               $("self.%s = %s"%($blk.get_id(), $code))
+               self.$blk.get_id() = $code
 #end for
 ########################################################
 ##Create Connections
@@ -152,13 +152,7 @@ class $(class_name)(gr.hier_block2):
        #else
                #set $sink_name = 'self.' + $sink.get_parent().get_id()
        #end if
-               $("self.connect((%s, %s), (%s, %s))"%(
-                               $source_name,
-                               $source.get_key(),
-                               $sink_name,
-                               $sink.get_key(),
-                       )
-               )
+               self.connect(($source_name, $source.get_key()), ($sink_name, $sink.get_key()))
 #end for
 
 ########################################################