Call for suggestions: Declaring data entry forms using Python classes

Carlos Ribeiro carribeiro at
Thu Sep 23 22:18:17 CEST 2004

On 23 Sep 2004 19:53:37 GMT, Bengt Richter <bokr at> wrote:
> On Thu, 23 Sep 2004 13:36:19 -0300, Carlos Ribeiro <carribeiro at> wrote:
> >Hello all,
> >
> >I'm posting this to the list with the intention to form a group of
> >people interested in this type of solution. I'm not going to spam the
> >list with it, unless for occasional and relevant announcements. If
> >you're interested, drop me a note. But if for some reason you think
> >that this discussion is fine here at the, please let me know.
> >
> No comment for now other than suggesting replacing pass with def __repr__ in
>     class Component(object):
>         def __repr__(self): return '<Comp %r>' % type(self).__name__
> for a more userfriendly printout. Interesting stuff. I wonder about
> one-dimensional position vs composing with various top/left/right/bottom/fill
> aggregation indicator info etc.

I'm doing stuff like this right now. My debug display was awful, it's
nicer after some __repr__() customization. I've also changed some
class names and moved the basic metaclass stuff in a module of their
own, called "metacontainer". It will make easier to reuse the basic
engine while I'm testing it.

> IOW, you are using python in a certain way in order to be able to "spell" your
> form-descriptions in a certain way. How would you spell them if you were not
> constrained by python syntax?

I regard this as an experiment. I don't know if it will be successful
or not, but I have to try it first ;-). I have a hunch that it will be
more usable in the long run, even with all constraints imposed by
Python syntax, than to define yet another language.

BTW, one can think about the constraints as problems, but they have a
definitive advantage: they  limit the scope of the problem to a much
more manageable size. I've seen plenty of projects for description
languages go nowhere, partly because people would spend a lot of time
arguing on how should things be structured :-)

Finally, I ask you to think about it for a while. It's still not
usable, but it may be really soon. I'm confident that, once one starts
using it, it will feel more natural than to have to work with yet
another language (as Tanebaum once said, there's a nice thing about
standards -- there are so many to choose from).

Carlos Ribeiro
Consultoria em Projetos
mail: carribeiro at
mail: carribeiro at

More information about the Python-list mailing list