Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66001
| Date | 2014-02-12 07:05 +0000 |
|---|---|
| From | John Allsup <pydev@allsup.co> |
| Subject | Top down Python |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6729.1392188714.18130.python-list@python.org> (permalink) |
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 | Next — Next in thread | Find similar | Unroll thread
Top down Python John Allsup <pydev@allsup.co> - 2014-02-12 07:05 +0000
Re: Top down Python John Gordon <gordon@panix.com> - 2014-02-12 07:40 +0000
Re: Top down Python Chris Angelico <rosuav@gmail.com> - 2014-02-12 18:50 +1100
Re: Top down Python Cousin Stanley <cousinstanley@gmail.com> - 2014-02-12 17:26 -0700
Re: Top down Python Chris Angelico <rosuav@gmail.com> - 2014-02-13 12:06 +1100
csiph-web