Top down Python

Ben Finney ben+python at benfinney.id.au
Wed Feb 12 03:09:14 EST 2014


John Allsup <pydev at allsup.co> writes:

> What is needed for proper learning is near-absolute simplicity.

I think that's too simplistic :-) but I'll take it as merely a
preference on your part for simplicity at this time.

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

Those are deeply dependent on exactly what operating system and desktop
environment and window manager your computer is running.

What exact values for those variables do you want
the simple program to assume?

No cross-platform standard library (such as the Python standard library)
will be able to reliably do those things without making a huge amount of
assumption of the operating environment, much of which will be wrong for
a large number of users.

If you can fix each of those things precisely so that you can ignore all
other possible values, then you can probably come up with a simple
program to do them.

>     3. Run a simple REPL program written in Python or Ruby within it.

Python has its own REPL, of course; you get it when you run ‘python’
from a command line. Simple!

If, on the other hand, you want a REPL that plugs into something *other
than* Python, what do you want it to plug into? You have a Python REPL
already, so if you want something else you'll need to be specific.

> I do not really want to write any more lines of code than I need to.

For what goal? Python optimises your lines of code for *communicating
with other programmers*, which in my view is pretty close to the most
important variable to be optimising.

-- 
 \     “I went camping and borrowed a circus tent by mistake. I didn't |
  `\      notice until I got it set up. People complained because they |
_o__)                           couldn't see the lake.” —Steven Wright |
Ben Finney




More information about the Python-list mailing list