commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10868 - in gnuradio/branches/developers/jblum/grc/grc


From: jblum
Subject: [Commit-gnuradio] r10868 - in gnuradio/branches/developers/jblum/grc/grc: data/platforms/python/blocks src/platforms/base
Date: Fri, 17 Apr 2009 12:45:37 -0600 (MDT)

Author: jblum
Date: 2009-04-17 12:45:36 -0600 (Fri, 17 Apr 2009)
New Revision: 10868

Modified:
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/blks2_rational_resampler_xxx.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_fft_vxx.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/options.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/probe_function.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_sink.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_histosink2.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_waterfallsink2.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/xmlrpc_client.xml
   gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Block.py
Log:
Replaced eval usage with handy __call__ method for template args.
Template usage is now var() replacing var.eval



Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
      2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
      2009-04-17 18:45:36 UTC (rev 10868)
@@ -44,7 +44,7 @@
                <key>device_name</key>
                <value></value>
                <type>string</type>
-               <hide>#if $device_name.eval then 'none' else 'part'#</hide>
+               <hide>#if $device_name() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>OK to Block</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
    2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
    2009-04-17 18:45:36 UTC (rev 10868)
@@ -44,7 +44,7 @@
                <key>device_name</key>
                <value></value>
                <type>string</type>
-               <hide>#if $device_name.eval then 'none' else 'part'#</hide>
+               <hide>#if $device_name() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>OK to Block</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/blks2_rational_resampler_xxx.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/blks2_rational_resampler_xxx.xml
    2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/blks2_rational_resampler_xxx.xml
    2009-04-17 18:45:36 UTC (rev 10868)
@@ -12,12 +12,12 @@
        <make>blks2.rational_resampler_$(type)(
        interpolation=$interp,
        decimation=$decim,
-#if $taps.eval
+#if $taps()
        taps=$taps,
 #else
        taps=None,
 #end if
-#if $fractional_bw.eval != 0
+#if $fractional_bw() != 0
        fractional_bw=$fractional_bw,
 #else
        fractional_bw=None,

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_fft_vxx.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_fft_vxx.xml
      2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_fft_vxx.xml
      2009-04-17 18:45:36 UTC (rev 10868)
@@ -9,7 +9,7 @@
        <key>gr_fft_vxx</key>
        <import>from gnuradio import gr</import>
        <import>from gnuradio import window</import>
-       <make>#if $type.eval == "complex"
+       <make>#if $type() == "complex"
 gr.fft_vcc($fft_size, $forward, $window, $shift)
 #else
 gr.fft_vfc($fft_size, $forward, $window)

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/options.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/options.xml
 2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/options.xml
 2009-04-17 18:45:36 UTC (rev 10868)
@@ -10,11 +10,11 @@
        <name>Options</name>
        <key>options</key>
        <import>from gnuradio import gr
-#if $generate_options.eval == 'wx_gui'
+#if $generate_options() == 'wx_gui'
 from grc_gnuradio import wxgui as grc_wxgui
 import wx
 #end if
-#if $generate_options.eval != 'hb'
+#if $generate_options() != 'hb'
 from optparse import OptionParser
 from gnuradio.eng_option import eng_option
 #end if
@@ -68,16 +68,16 @@
                <key>category</key>
                <value>Custom</value>
                <type>string</type>
-               <hide>#if $generate_options.eval == 'hb' then 'none' else 
'all'#</hide>
+               <hide>#if $generate_options() == 'hb' then 'none' else 
'all'#</hide>
        </param>
        <param>
                <name>Realtime Scheduling</name>
                <key>realtime_scheduling</key>
                <value></value>
                <type>enum</type>
-               <hide>#if $generate_options.eval == 'hb'
+               <hide>#if $generate_options() == 'hb'
 all#slurp
-#elif $realtime_scheduling.eval
+#elif $realtime_scheduling()
 none#slurp
 #else
 part#slurp

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/probe_function.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/probe_function.xml
  2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/probe_function.xml
  2009-04-17 18:45:36 UTC (rev 10868)
@@ -9,7 +9,7 @@
        <key>probe_function</key>
        <import>from grc_gnuradio import blks2 as grc_blks2</import>
        <make>grc_blks2.probe_function(
-       probe_callback=self.$(block_id.eval).$(function_name.eval),
+       probe_callback=self.$(block_id()).$(function_name()),
        probe_rate=$probe_rate,
 )</make>
        <callback>set_probe_rate($probe_rate)</callback>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
 2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
 2009-04-17 18:45:36 UTC (rev 10868)
@@ -8,9 +8,9 @@
        <name>USRP2 Sink</name>
        <key>usrp2_sink_xxxx</key>
        <import>from gnuradio import usrp2</import>
-       <make>#if not $interface.eval and not $mac_addr.eval
+       <make>#if not $interface() and not $mac_addr()
 usrp2.sink_$(type.fcn)()
-#elif not $mac_addr.eval
+#elif not $mac_addr()
 usrp2.sink_$(type.fcn)($interface)
 #else
 usrp2.sink_$(type.fcn)($interface, $mac_addr)

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
       2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
       2009-04-17 18:45:36 UTC (rev 10868)
@@ -8,9 +8,9 @@
        <name>USRP2 Source</name>
        <key>usrp2_source_xxxx</key>
        <import>from gnuradio import usrp2</import>
-       <make>#if not $interface.eval and not $mac_addr.eval
+       <make>#if not $interface() and not $mac_addr()
 usrp2.source_$(type.fcn)()
-#elif not $mac_addr.eval
+#elif not $mac_addr()
 usrp2.source_$(type.fcn)($interface)
 #else
 usrp2.source_$(type.fcn)($interface, $mac_addr)

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
        2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
        2009-04-17 18:45:36 UTC (rev 10868)
@@ -9,7 +9,7 @@
        <key>usrp_dual_sink_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
        <make>grc_usrp.dual_sink_$(type.fcn)(which=$which)
-#if $format.eval
+#if $format()
 self.$(id).set_format(width=$format.width, shift=$format.shift)
 #end if
 self.$(id).set_interp_rate($interpolation)
@@ -60,7 +60,7 @@
                <key>format</key>
                <value></value>
                <type>enum</type>
-               <hide>#if $format.eval then '' else 'part'#</hide>
+               <hide>#if $format() then '' else 'part'#</hide>
                <option>
                        <name>16 Bits (Default)</name>
                        <key></key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
      2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
      2009-04-17 18:45:36 UTC (rev 10868)
@@ -9,7 +9,7 @@
        <key>usrp_dual_source_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
        <make>grc_usrp.dual_source_$(type.fcn)(which=$which, 
rx_ant_a='$rx_ant_a', rx_ant_b='$rx_ant_b')
-#if $format.eval
+#if $format()
 self.$(id).set_format(width=$format.width, shift=$format.shift)
 #end if
 self.$(id).set_decim_rate($decimation)
@@ -42,7 +42,7 @@
                <key>format</key>
                <value></value>
                <type>enum</type>
-               <hide>#if $format.eval then '' else 'part'#</hide>
+               <hide>#if $format() then '' else 'part'#</hide>
                <option>
                        <name>16 Bits (Default)</name>
                        <key></key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-04-17 18:45:36 UTC (rev 10868)
@@ -9,7 +9,7 @@
        <key>usrp_simple_sink_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
        <make>grc_usrp.simple_sink_$(type.fcn)(which=$which, side='$side')
-#if $format.eval
+#if $format()
 self.$(id).set_format(width=$format.width, shift=$format.shift)
 #end if
 self.$(id).set_interp_rate($interpolation)
@@ -44,7 +44,7 @@
                <key>format</key>
                <value></value>
                <type>enum</type>
-               <hide>#if $format.eval then '' else 'part'#</hide>
+               <hide>#if $format() then '' else 'part'#</hide>
                <option>
                        <name>16 Bits (Default)</name>
                        <key></key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
    2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
    2009-04-17 18:45:36 UTC (rev 10868)
@@ -8,8 +8,8 @@
        <name>USRP Source</name>
        <key>usrp_simple_source_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
-       <make>grc_usrp.simple_source_$(type.fcn)(which=$which, side='$side', 
rx_ant='$rx_ant'#if $hb_filters.eval then ', no_hb=True' else ''#)
-#if $format.eval
+       <make>grc_usrp.simple_source_$(type.fcn)(which=$which, side='$side', 
rx_ant='$rx_ant'#if $hb_filters() then ', no_hb=True' else ''#)
+#if $format()
 self.$(id).set_format(width=$format.width, shift=$format.shift)
 #end if
 self.$(id).set_decim_rate($decimation)
@@ -38,7 +38,7 @@
                <key>format</key>
                <value></value>
                <type>enum</type>
-               <hide>#if $format.eval then '' else 'part'#</hide>
+               <hide>#if $format() then '' else 'part'#</hide>
                <option>
                        <name>16 Bits (Default)</name>
                        <key></key>
@@ -118,7 +118,7 @@
                <key>hb_filters</key>
                <value></value>
                <type>enum</type>
-               <hide>#if $hb_filters.eval then 'none' else 'part'#</hide>
+               <hide>#if $hb_filters() then 'none' else 'part'#</hide>
                <option>
                        <name>Enable</name>
                        <key></key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
        2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
        2009-04-17 18:45:36 UTC (rev 10868)
@@ -17,18 +17,18 @@
        parent=self.GetWin(),
        ps=self,
        key='$id',
-       #if $label.eval
+       #if $label()
        label=$label,
        #else
        label='$id',
        #end if
        choices=$choices,
        labels=$labels,
-#if $type.eval == 'radio_buttons'
+#if $type() == 'radio_buttons'
        style=$style,
 #end if
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self._$(id)_control)
 #else
@@ -81,7 +81,7 @@
                <key>style</key>
                <value>wx.RA_HORIZONTAL</value>
                <type>enum</type>
-               <hide>#if $type.eval == 'radio_buttons' then 'part' else 
'all'#</hide>
+               <hide>#if $type() == 'radio_buttons' then 'part' else 
'all'#</hide>
                <option>
                        <name>Horizontal</name>
                        <key>wx.RA_HORIZONTAL</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_sink.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_sink.xml
   2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_sink.xml
   2009-04-17 18:45:36 UTC (rev 10868)
@@ -15,13 +15,13 @@
        while True:
                time.sleep(1.0/$samp_rate)
                data = self.$(id).data()
-#if $vlen.eval == 0
+#if $vlen() == 0
                if data:
-                       self.set_$(variable.eval)(data[-1])
+                       self.set_$(variable())(data[-1])
                        self.$(id).clear()
 #else
                if len(data) &gt;= $vlen:
-                       self.set_$(variable.eval)(data[-($vlen):])
+                       self.set_$(variable())(data[-($vlen):])
                        self.$(id).clear()
 #end if
 threading.Thread(target=_$(id)_run).start()</make>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
 2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
 2009-04-17 18:45:36 UTC (rev 10868)
@@ -18,7 +18,7 @@
        sizer=self._$(id)_sizer,
        ps=self,
        key='$id',
-       #if $label.eval
+       #if $label()
        label=$label,
        #else
        label='$id',
@@ -38,7 +38,7 @@
        cast=$(converver.slider_cast),
        proportion=1,
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self._$(id)_sizer)
 #else

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
       2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
       2009-04-17 18:45:36 UTC (rev 10868)
@@ -16,14 +16,14 @@
        parent=self.GetWin(),
        ps=self,
        key='$id',
-       #if $label.eval
+       #if $label()
        label=$label,
        #else
        label='$id',
        #end if
        converter=forms.$(converver)(),
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self._$(id)_control)
 #else

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml
        2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml
        2009-04-17 18:45:36 UTC (rev 10868)
@@ -23,7 +23,7 @@
        symbol_rate=$symbol_rate,
        omega_limit=$omega_limit,
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self.$(id).win)
 #else

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
  2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
  2009-04-17 18:45:36 UTC (rev 10868)
@@ -17,11 +17,11 @@
        fft_size=$fft_size,
        fft_rate=$fft_rate,
        average=$average,
-       avg_alpha=#if $avg_alpha.eval then $avg_alpha else 'None'#,
+       avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
        title=$title,
        peak_hold=$peak_hold,
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self.$(id).win)
 #else
@@ -112,7 +112,7 @@
                <key>peak_hold</key>
                <value>False</value>
                <type>enum</type>
-               <hide>#if $peak_hold.eval == 'True' then 'none' else 
'part'#</hide>
+               <hide>#if $peak_hold() == 'True' then 'none' else 'part'#</hide>
                <option>
                        <name>On</name>
                        <key>True</key>
@@ -127,7 +127,7 @@
                <key>average</key>
                <value>False</value>
                <type>enum</type>
-               <hide>#if $average.eval == 'True' then 'none' else 
'part'#</hide>
+               <hide>#if $average() == 'True' then 'none' else 'part'#</hide>
                <option>
                        <name>On</name>
                        <key>True</key>
@@ -142,7 +142,7 @@
                <key>avg_alpha</key>
                <value>0</value>
                <type>real</type>
-               <hide>#if $average.eval == 'True' then 'none' else 'all'#</hide>
+               <hide>#if $average() == 'True' then 'none' else 'all'#</hide>
        </param>
        <param>
                <name>Grid Position</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_histosink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_histosink2.xml
        2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_histosink2.xml
        2009-04-17 18:45:36 UTC (rev 10868)
@@ -14,7 +14,7 @@
        num_bins=$num_bins,
        frame_size=$frame_size,
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self.$(id).win)
 #else

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
       2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
       2009-04-17 18:45:36 UTC (rev 10868)
@@ -20,12 +20,12 @@
        sample_rate=$samp_rate,
        number_rate=$number_rate,
        average=$average,
-       avg_alpha=#if $avg_alpha.eval then $avg_alpha else 'None'#,
+       avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
        label=$title,
        peak_hold=$peak_hold,
        show_gauge=$show_gauge,
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self.$(id).win)
 #else
@@ -112,7 +112,7 @@
                <key>peak_hold</key>
                <value>False</value>
                <type>enum</type>
-               <hide>#if $peak_hold.eval == 'True' then 'none' else 
'part'#</hide>
+               <hide>#if $peak_hold() == 'True' then 'none' else 'part'#</hide>
                <option>
                        <name>On</name>
                        <key>True</key>
@@ -127,7 +127,7 @@
                <key>average</key>
                <value>False</value>
                <type>enum</type>
-               <hide>#if $average.eval == 'True' then 'none' else 
'part'#</hide>
+               <hide>#if $average() == 'True' then 'none' else 'part'#</hide>
                <option>
                        <name>On</name>
                        <key>True</key>
@@ -142,7 +142,7 @@
                <key>avg_alpha</key>
                <value>0</value>
                <type>real</type>
-               <hide>#if $average.eval == 'True' then 'none' else 'all'#</hide>
+               <hide>#if $average() == 'True' then 'none' else 'all'#</hide>
        </param>
        <param>
                <name>Show Gauge</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
        2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
        2009-04-17 18:45:36 UTC (rev 10868)
@@ -19,7 +19,7 @@
        xy_mode=$xy_mode,
        num_inputs=$num_inputs,
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self.$(id).win)
 #else
@@ -71,7 +71,7 @@
                <key>ac_couple</key>
                <value>False</value>
                <type>enum</type>
-               <hide>#if $ac_couple.eval == 'True' then 'none' else 
'part'#</hide>
+               <hide>#if $ac_couple() == 'True' then 'none' else 'part'#</hide>
                <option>
                        <name>Off</name>
                        <key>False</key>
@@ -86,7 +86,7 @@
                <key>xy_mode</key>
                <value>False</value>
                <type>enum</type>
-               <hide>#if $xy_mode.eval == 'True' then 'none' else 
'part'#</hide>
+               <hide>#if $xy_mode() == 'True' then 'none' else 'part'#</hide>
                <option>
                        <name>Off</name>
                        <key>False</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_waterfallsink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_waterfallsink2.xml
    2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/wxgui_waterfallsink2.xml
    2009-04-17 18:45:36 UTC (rev 10868)
@@ -17,10 +17,10 @@
        fft_size=$fft_size,
        fft_rate=$fft_rate,
        average=$options.average,
-       avg_alpha=#if $avg_alpha.eval then $avg_alpha else 'None'#,
+       avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
        title=$title,
 )
-#set $grid_pos = $grid_pos.eval
+#set $grid_pos = $grid_pos()
 #if not grid_pos
 self.Add(self.$(id).win)
 #else

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/xmlrpc_client.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/xmlrpc_client.xml
   2009-04-17 18:28:59 UTC (rev 10867)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/xmlrpc_client.xml
   2009-04-17 18:45:36 UTC (rev 10868)
@@ -8,8 +8,8 @@
        <name>XMLRPC Client</name>
        <key>xmlrpc_client</key>
        <import>import xmlrpclib</import>
-       <make>xmlrpclib.Server('http://$(addr.eval):$(port)')</make>
-       <callback>$(callback.eval)($variable)</callback>
+       <make>xmlrpclib.Server('http://$(addr()):$(port)')</make>
+       <callback>$(callback())($variable)</callback>
        <param>
                <name>Address</name>
                <key>addr</key>

Modified: gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Block.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Block.py      
2009-04-17 18:28:59 UTC (rev 10867)
+++ gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Block.py      
2009-04-17 18:45:36 UTC (rev 10868)
@@ -30,7 +30,7 @@
        A cheetah template argument created from a param.
        The str of this class evaluates to the param's to code method.
        The use of this class as a dictionary (enum only) will reveal the enum 
opts.
-       The eval method can return the param evaluated to a raw python data 
type.
+       The __call__ or () method can return the param evaluated to a raw 
python data type.
        """
 
        def __init__(self, param):
@@ -43,7 +43,7 @@
        def __str__(self):
                return str(self._param.to_code())
 
-       def eval(self):
+       def __call__(self):
                return self._param.evaluate()
 
 class Block(Element):





reply via email to

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