commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10281 - gnuradio/trunk/grc/data/platforms/python


From: jblum
Subject: [Commit-gnuradio] r10281 - gnuradio/trunk/grc/data/platforms/python
Date: Wed, 21 Jan 2009 15:43:58 -0700 (MST)

Author: jblum
Date: 2009-01-21 15:43:57 -0700 (Wed, 21 Jan 2009)
New Revision: 10281

Modified:
   gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl
Log:
template simplify

Modified: gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl    2009-01-21 
22:10:05 UTC (rev 10280)
+++ gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl    2009-01-21 
22:43:57 UTC (rev 10281)
@@ -18,10 +18,10 @@
 #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 @@
 #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 @@
        #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
 
 ########################################################





reply via email to

[Prev in Thread] Current Thread [Next in Thread]