# GUI building with python reflection

**URL:** <https://www.ruby-forum.com/t/gui-building-with-python-reflection/59597>\
**Category:** GNU Radio\
**Created:** [May 4, 2006, 3:14pm UTC](https://www.ruby-forum.com/t/gui-building-with-python-reflection/59597 "2006-05-04T15:14:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkspence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Post date:** [May 4, 2006, 3:14pm UTC](https://www.ruby-forum.com/t/gui-building-with-python-reflection/59597/1 "2006-05-04T15:14:52Z")

</div>

Hello!

Reading the post about Googles’s SoC it reminded me of an idea had for  
quite a while:

Imagine a graphical interface to Gnuradio where all python blocks are  
represented by some widget, with name, parameters, description/doc and  
the like. On the left side fo an widget you’ve some docking nodes for  
input, on the right side nodes for output. All available blocks are  
presented in a toolbar. You create a flowgraph (like a “work space”) and  
drag the blocks onto the flowgraph. The new inserted block is initially  
named \<block\_type\>\_, which you’ll probably change at first. To  
connect blocks, just click on a input or output docking node and drag to  
the corresponding docking node on a different block to do a  
flowgraph.connect(). To change options, simply click on the option and  
edit, or create some “data type” block, which holds the value and would  
be connected to some block’s options.  
The interface does sanity checks while you build your application, maybe  
even constructs a working flowgraph on the fly, and runs it. If an error  
occurs the user is notified.

I hope it’s clear what I mean: graphical programming. I’m not sure if  
Python supports enough reflection to give information about the block  
properties, so no explicit description has to be written for each and  
every block. With good python docstrings help can be context sensitive.

Perhaps people with wxGlade experience have an idea how to connect a  
wxWidgets interface to the Application Builder.

Something I’ve not sorted out is saving: Should the Application Build  
generate python code or some description format? Where should metadata  
(position, description) go (comments, metadata file)? What about  
reading/parsing handwritten apps?

## Patrick

Engineers motto: cheap, good, fast: choose any two  
Patrick S.   
Student of Telematik, Techn. University Graz, Austria
