Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64563

Re: Python declarative

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Python declarative
Date 2014-01-22 23:08 -0500
References <mailman.5529.1389805825.18130.python-list@python.org> <8fde6d34-47c5-49a1-a6d0-9ffe3df2d401@googlegroups.com> <CAPTjJmokZUHta7Y3x_=6eUjKpv2Td2iaqro1su7NuLo+gfzwag@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5866.1390450100.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 1/22/2014 9:29 PM, Chris Angelico wrote:
> On Thu, Jan 23, 2014 at 8:16 AM, Asaf Las <roegltd@gmail.com> wrote:
>> i am novice in python, but let me suggest you something:
>> it would be beneficial to use json text file to specify
>> your gui so composite data structure can be created using
>> json and then your program can construct window giving
>> its content will be based on simple text file?
>> You can add every parameter to json encoded window system
>> once your window construction will be using as interpreter
>> for that. JSON is very structured and quite presentable for
>> such kind of things.

> JSON is better than XML for that, but in my opinion, both are
> unnecessary. Python code is easy to edit. (See [1] for more on Python
> and XML.) When you're writing compiled code, it makes good sense to
> drop out of code and use a simple text file when you can; but when
> your code *is* a simple text file, why go to the effort of making a
> JSON-based window builder? (Unless you already have one. GladeXML may
> well be exactly what you want, in which case, go ahead and use it. But
> personally, I don't.) JSON is a fantastic format for transmitting
> complex objects around the internet; it's compact (unlike XML),
> readable in many languages (like XML), easily readable by humans
> (UNLIKE XML!), and can represent all the most common data structures
> (subtly, XML can't technically do this). It's superb at what it
> does... but it doesn't do Python GUIs. For those, use Python itself.

I would only use JSON if I wanted a declaration format that was 
independent of implementation languages, that could be read and turned 
into application objects by as least two languages.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python declarative Sergio Tortosa Benedito <sertorbe@gmail.com> - 2014-01-15 18:02 +0100
  Re: Python declarative Francesco Bochicchio <bieffe62@gmail.com> - 2014-01-17 06:22 -0800
    Re: Python declarative Francesco Bochicchio <bieffe62@gmail.com> - 2014-01-19 23:25 -0800
  Re: Python declarative sertorbe@gmail.com - 2014-01-17 06:47 -0800
    Re: Python declarative Tim Roberts <timr@probo.com> - 2014-01-18 13:13 -0800
  Re: Python declarative sertorbe@gmail.com - 2014-01-19 02:27 -0800
  Re: Python declarative sertorbe@gmail.com - 2014-01-22 12:38 -0800
  Re: Python declarative Asaf Las <roegltd@gmail.com> - 2014-01-22 13:16 -0800
    Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-23 13:29 +1100
    Re: Python declarative Terry Reedy <tjreedy@udel.edu> - 2014-01-22 23:08 -0500
    Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-24 11:21 +0200
      Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-24 01:53 -0800
        Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-24 15:06 +0200
    Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-24 22:18 +1100
    Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-24 14:49 +0200
    Re: Python declarative Burak Arslan <burak.arslan@arskom.com.tr> - 2014-01-24 15:40 +0200
    Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-25 00:55 +1100
    Re: Python declarative Matěj Cepl <mcepl@redhat.com> - 2014-01-24 17:28 +0100
    Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-25 03:33 +1100
      Re: Python declarative sertorbe@gmail.com - 2014-01-24 10:51 -0800
    Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-25 09:18 +0200
      Re: Python declarative Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-26 02:33 +0000
        Re: Python declarative Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-26 02:45 +0000
          Re: Python declarative Asaf Las <roegltd@gmail.com> - 2014-02-02 18:17 -0800
        Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-26 14:38 +1100
        Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-26 15:06 +1100
          Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-25 20:47 -0800
            Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-26 16:23 +1100
              Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-26 00:05 -0800
                Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-26 11:12 +0200
                Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-26 06:36 -0800
          Re: Python declarative Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-26 12:05 +0000
        Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-26 08:03 +0200
          Re: Python declarative Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-26 12:21 +0000
    Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-25 18:33 +1100
    Re: Python declarative matej@ceplovi.cz (Matěj Cepl) - 2014-01-25 12:23 +0100
  Re: Python declarative Asaf Las <roegltd@gmail.com> - 2014-01-24 04:04 -0800

csiph-web