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


Groups > comp.lang.python > #66054

Re: Top down Python

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <pydev@allsup.co>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'python)': 0.05; 'say,': 0.05; 'subject:Python': 0.06; 'lines,': 0.07; 'python3': 0.07; 'skip:p 60': 0.07; 'bits': 0.09; 'properly.': 0.09; 'received:212.227.126': 0.09; 'python': 0.11; 'def': 0.12; 'suggest': 0.14; 'background.': 0.14; 'itself,': 0.16; 'massively': 0.16; 'readable': 0.16; 'received:212.227.126.187': 0.16; 'repl': 0.16; 'simplicity.': 0.16; 'wastes': 0.16; 'write,': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'app': 0.19; 'trying': 0.19; 'basically': 0.19; 'drawing': 0.19; 'possible,': 0.19; 'server,': 0.19; 'written': 0.21; 'seems': 0.21; 'programming': 0.22; 'import': 0.22; '(in': 0.22; 'header:User-Agent:1': 0.23; 'script.': 0.24; 'setup,': 0.24; 'simpler': 0.24; 'stick': 0.24; 'sort': 0.25; "i've": 0.25; 'source': 0.25; '(for': 0.26; 'header :In-Reply-To:1': 0.27; 'leave': 0.29; 'scale': 0.29; 'thus': 0.29; 'strongly': 0.30; "i'm": 0.30; 'code': 0.31; 'lines': 0.31; 'concise': 0.31; 'libraries': 0.31; 'with,': 0.31; 'this.': 0.32; 'front': 0.32; 'run': 0.32; 'guess': 0.33; 'projects.': 0.33; 'skip:# 10': 0.33; 'basic': 0.35; 'anybody': 0.35; 'but': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'described': 0.36; 'done': 0.36; "i'll": 0.36; 'should': 0.36; 'too': 0.37; 'performance': 0.37; 'skip:o 20': 0.38; 'server': 0.38; 'window': 0.38; 'needed': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'future': 0.60; 'commands': 0.60; 'engines': 0.60; 'skip:a 30': 0.61; 'browser': 0.61; 'john': 0.61; 'simply': 0.61; 'simple': 0.61; 'high': 0.63; 'skip:n 10': 0.64; 'our': 0.64; 'more': 0.64; 'within': 0.65; 'received:46': 0.66; 'beautiful': 0.68; 'rendering': 0.68; 'skip:w 40': 0.68; 'browser.': 0.78; 'browsers,': 0.84; 'characters,': 0.84; 'coupled': 0.84; 'end.': 0.84; 'induces': 0.84; 'quickest': 0.84; 'subject:Top': 0.84; 'tolerate': 0.84; 'toy': 0.84; 'working,': 0.84; 'graphical': 0.91; 'picture': 0.97
Date Wed, 12 Feb 2014 16:40:44 +0000
From John Allsup <pydev@allsup.co>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Top down Python
References <52FB1D27.8090009@allsup.co>
In-Reply-To <52FB1D27.8090009@allsup.co>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:G7IAE/Pm7tpnM51Vfr5Hrv6cN15VeAC0XuGWX+zrABv +MGXAupDjD1HC2U9dTwXe90dlWbQEo867fgkU87m3hluAL1S47 mqx8uCE7GY9Vks9bggRlrSiKBiYxFnwPPnfegr52gRrIsKlY4T nk+puHrSWubWXNunkb/fwc0qXY4vvjcwHsmT+lzjtcl+B4Kgc4 zBZhlt0KraVMsxKPlOVgi7UuNDUektNUiwSfonpiBGqCR/6eW+ LR+iJV3EpO9caelpxOIRxko6x5VifBef+E7sCFRqwKoy/wyy1V hUPUhdbG9G5hE1yybnS7b5uiQfZKXEwlF+IKr9vSaI9RBqlC59 l7gAaewA6wTPlQWDiUpMaGH3yOC3cViVvoop496oD
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6763.1392223253.18130.python-list@python.org> (permalink)
Lines 62
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1392223253 news.xs4all.nl 2917 [2001:888:2000:d::a6]:57031
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:66054

Show key headers only | View raw


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).

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


Thread

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

csiph-web