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


Groups > comp.lang.python > #66054 > unrolled thread

Re: Top down Python

Started byJohn Allsup <pydev@allsup.co>
First post2014-02-12 16:40 +0000
Last post2014-02-13 11:54 +1300
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Top down Python John Allsup <pydev@allsup.co> - 2014-02-12 16:40 +0000
    Re: Top down Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-13 11:54 +1300

#66054 — Re: Top down Python

FromJohn Allsup <pydev@allsup.co>
Date2014-02-12 16:40 +0000
SubjectRe: Top down Python
Message-ID<mailman.6763.1392223253.18130.python-list@python.org>
I've realised that the best way to do this is to use a web browser for 
the graphical front end: high end graphics are simply not a necessity 
here, so one does not need to leave the confines of the browser.  Thus 
we need a simple server script.

I'm still minimalist, so I guess we want xmlrpc and a python server, 
with a bit of javascript in the browser to sort out the drawing end. 
This now seems way simpler than trying to play with Gtk or Qt.

Basically the lesson is to use a web browser engine as a graphics engine 
unless you have performance issues.  Hopefully in future html rendering 
engines will not be so strongly coupled to browsers, or even to the html 
format itself, but will be a general purpose user graphics engine (an 
ncurses for bitmapped displays).

Can anybody suggest the quickest way to learn the bits of xmlrpc (in 
python) that I need to do this.  Once it's working, I'll stick a source 
code download on my website.  There will be only one version released: 
the one that works properly.  Thus there is no need to github this.

All the best,

def my_sig():
     print("--")
     print(signame(['n','o','h',uppercase('j')]).written_backwards)

On 12/02/2014 07:05, John Allsup wrote:
> What is needed for proper learning is near-absolute simplicity.
> Even one toy too many to play with is an intolerable distraction,
> but one too few massively hampers learning and induces boredom.
>
> I want to be able to say:
>      1. Put a nice picture on the background.
>      2. Put a terminal window with, say, 64x20 lines, dead centre.
>      3. Run a simple REPL program written in Python or Ruby within it.
> I do not really want to write any more lines of code than I need to.
> Why do we not have langauges and libraries that can do the above
> with only five lines of code (line 0 == setup, line 4 == cleanup).
>
> Programming should be that efficient if we learn to make things
> beautiful and not tolerate wastes of lines and characters, on
> a global scale as well as locally to our projects.
>
> Consider
> ====
> #!/usr/bin/env python3
>
> from myappfw import app
> from myapp1 import repl
> app.background = "Moutains1"
> t = app.terminal.open(title="Typing commands One Oh One",position="centre",
>      width="80%",height="72%",rows="20",columns="64")
> exit(t.run(repl))
> ====
>
> What Python would I need to write, as concise but readable as
> practically possible, so that the above program works as desired (for
> any repl that obeys the basic input-process-output behaviour of a repl)?
>
> This is top-down design done right IMO (as described in Thinking Forth,
> by the way).

[toc] | [next] | [standalone]


#66111

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2014-02-13 11:54 +1300
Message-ID<bm2cduF54a0U1@mid.individual.net>
In reply to#66054
John Allsup wrote:
> I'm still minimalist, so I guess we want xmlrpc and a python server, 
> with a bit of javascript in the browser to sort out the drawing end. 
> This now seems way simpler than trying to play with Gtk or Qt.

Depends on what you mean by "simpler".  You've just
mentioned about 3 additional technologies to come
to grips with, plus the complexity of splitting
your application logic between a client and a
server.

Whether this is any easier depends on what you're
already familiar with.

-- 
Greg

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web