Python component model

Edward Diener No Spam eldiener_no_spam_here at
Tue Oct 10 23:59:56 CEST 2006

Fredrik Lundh wrote:
> fumanchu wrote:
>>> 4) Custom property and component editors: A component editor can present
>>> a property editor or an editor for an entire component which the visual
>>> design-time RAD environment can use to allow the programmer end-user of
>>> the component to set or get component property values. Normally a design
>>> time environment will present default property editors for each
>>> component property type, but a component can override this.
>> This is the hard part. I believe Dabo has done some work in this space,
>> but this is where the tight coupling comes in between code and tool, a
>> coupling which Python has traditionally resisted.
> that's not that hard on a pure technical level; even a "basic" tool
> like IDLE can hook itself into an executing Python process.  once you're 
> hooked up, you can inspect and modify most about everything.
> for example, doing remote tweaking of live Tkinter widget trees is 
> pretty straight-forward.
> coming up with a good way to capture the modifications, and use them in 
> your actual application, is a bit harder.  do you really want to replace 
> plain old source code with some kind of more or less obscure resource 
> files?

The Visual Studio RAD IDE environment actually modifies source code 
constructors, via an InitializeComponent() function called from it, in 
order to set properties and events in components. It does mark the 
function as such with comments in the source code. OTOH Borland's VCL 
uses the resource file technique you scorn above, linking in the code 
via resources and automatically updating a component's properties and 
events from base class components constructors. I believe Java's JVM 
automatically deserializes .ser files at run-time saved by a RAD 
designer in order to set properties and events on an object of a class.

There are obviously numerous techniques, so one should theoretically 
work well with Python.

> and designing a metadata vocabulary that's powerful enough to be useful 
> for more than just one or a few target domains might be really hard.

That's the are I am most interested in.

More information about the Python-list mailing list