summaryrefslogtreecommitdiff
path: root/grc/data/platforms/python/blocks/parameter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'grc/data/platforms/python/blocks/parameter.xml')
-rw-r--r--grc/data/platforms/python/blocks/parameter.xml48
1 files changed, 47 insertions, 1 deletions
diff --git a/grc/data/platforms/python/blocks/parameter.xml b/grc/data/platforms/python/blocks/parameter.xml
index b9dcce424..de2085011 100644
--- a/grc/data/platforms/python/blocks/parameter.xml
+++ b/grc/data/platforms/python/blocks/parameter.xml
@@ -7,6 +7,7 @@
<block>
<name>Parameter</name>
<key>parameter</key>
+ <import>from optparse import OptionParser</import>
<make>$value</make>
<param>
<name>Label</name>
@@ -18,7 +19,50 @@
<name>Value</name>
<key>value</key>
<value>0</value>
- <type>raw</type>
+ <type>$type.type</type>
+ </param>
+ <param>
+ <name>Type</name>
+ <key>type</key>
+ <value></value>
+ <type>enum</type>
+ <hide>$type.hide</hide>
+ <option>
+ <name>None</name>
+ <key></key>
+ <opt>type:raw</opt>
+ <opt>hide:part</opt>
+ </option>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>type:complex</opt>
+ <opt>hide:none</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>type:real</opt>
+ <opt>hide:none</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>type:int</opt>
+ <opt>hide:none</opt>
+ </option>
+ <option>
+ <name>Long</name>
+ <key>long</key>
+ <opt>type:int</opt>
+ <opt>hide:none</opt>
+ </option>
+ <option>
+ <name>String</name>
+ <key>string</key>
+ <opt>type:string</opt>
+ <opt>hide:none</opt>
+ </option>
</param>
<doc>
This block represents a parameter to the flow graph, \
@@ -27,5 +71,7 @@ used when the flow graph is instantiated as a hier block.
The paramater value cannot depend on any variables.
Leave the label blank to use the parameter id as the label.
+
+When type is not None, this parameter also becomes a command line option of the form --[id] [value].
</doc>
</block>