Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'feedback.': 0.04; 'subject:Python': 0.06; 'label,': 0.09; 'lines.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'jan': 0.12; 'wrote': 0.14; '(it': 0.16; '24,': 0.16; 'aiming': 0.16; 'discussion.': 0.16; 'for,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'skip:n 70': 0.16; 'stuff.': 0.16; 'unlikely': 0.16; 'yet)': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'widget': 0.19; 'solution.': 0.20; 'example': 0.22; 'portion': 0.22; 'separate': 0.22; 'browsers': 0.24; 'first,': 0.26; 'header:X-Complaints-To:1': 0.27; 'respective': 0.29; 'xml': 0.29; 'designer': 0.30; 'see,': 0.30; 'skip:g 30': 0.30; 'claiming': 0.31; 'second,': 0.31; 'quite': 0.32; 'fri,': 0.33; 'period': 0.33; 'screen': 0.34; 'beyond': 0.35; 'definition': 0.35; 'one,': 0.35; 'but': 0.35; 'version': 0.36; 'achieving': 0.36; 'done': 0.36; 'shows': 0.36; 'thanks': 0.36; 'possible': 0.36; 'skip:- 20': 0.37; 'two': 0.37; 'needed': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'release': 0.40; 'how': 0.40; 'even': 0.60; 'worry': 0.60; 'devices': 0.61; 'url:5': 0.61; 'took': 0.61; 'simple': 0.61; 'show': 0.63; 'our': 0.64; 'here': 0.66; 'approaches': 0.68; 'frank': 0.68; 'stated': 0.69; 'press': 0.70; 'internet': 0.71; 'future,': 0.83; 'different.': 0.84; 'explorer': 0.84; 'url:tinypic': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: "Frank Millman" Subject: Re: Python declarative Date: Sat, 25 Jan 2014 09:18:44 +0200 References: <8fde6d34-47c5-49a1-a6d0-9ffe3df2d401@googlegroups.com> X-Gmane-NNTP-Posting-Host: 197.87.184.151 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.4657 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4913 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 126 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390634333 news.xs4all.nl 2945 [2001:888:2000:d::a6]:57352 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64728 "Chris Angelico" wrote in message news:CAPTjJmpi-kvJAVs2gK+nH5n6q3REkJaKR=CZeRfzUgDk8_VLGw@mail.gmail.com... > On Fri, Jan 24, 2014 at 11:49 PM, Frank Millman > wrote: >> > [...] I have realised that we unlikely to come to an agreement on this in the near future, as our philosophies are completely different. You have stated that your objective is to express as much as possible in Python code. I have stated that my objective is to express as little as possible in Python code. We would have to resolve that difference of opinion first, before discussing our respective approaches in detail, and that is way beyond the scope of this thread. As a brief example of my approach, here is how I would write your simple 'About' box. Here is your version - mainwindow = GTK2.Window(0)->add(GTK2.Vbox(0,0) ->add(GTK2.Label("About Gypsum: big long multi-line string")) ->add(GTK2.HbuttonBox() ->add(GTK2.Button("Close")) ->add(GTK2.Button("Foobar")) ) ); Here is my version -
Currently I do not have a widget for a multi-line label, so I just show three separate lines. If I ever needed one, it would not take long to create. I took two screenshots, but I don't know the best way to upload and share them. I found a site called tinypic, which works, but the screen is cluttered with a lot of other stuff. Still, it shows what I want. First, here is the screen as rendered in Internet Explorer (it works in other browsers as well - even on my smart phone, though I have not done any optimising for mobile devices yet) - http://tinypic.com/r/ip15xx/5 Second, here is the screen designer, showing a portion of the screen definition - one of the buttons. As you can see, the designer does not have to worry about XML at all - http://tinypic.com/r/1j7sdh/5 I am not claiming that I am 'right', or that this is a perfect solution. It is just 'where I am' right now, after quite a long period of evolution, and it is achieving a large portion of what I am aiming for, so I will press on with my current approach for now. Hopefully it will not take *too* long before I am in a position to release something, and then I will be very interested in any feedback. Thanks for the interesting discussion. Frank