Top down Python

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Feb 12 11:56:34 EST 2014


On 12/02/2014 16:40, John Allsup wrote:
> 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).
>

Please don't top post on this list.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com





More information about the Python-list mailing list