On 20 April 2016 at 07:08, Terry Reedy <tjre...@udel.edu> wrote: > On 4/19/2016 11:41 PM, Chris Angelico wrote: >> >> On Wed, Apr 20, 2016 at 1:23 PM, Terry Reedy <tjre...@udel.edu> wrote: >>>> >>>> It kinda looks like Hypertalk syntax, which some of you may remember I'm >>>> exceedingly fond of. There's no reason why a GUI editor couldn't display >>>> Python code using such "building block" structure. E.g. indented blocks >>>> could use colour and shape cues to reinforce the structure of the code, >>>> just as Scratch does. >>> >>> >>> >>> That is an interesting idea. Perhaps I have been stuck in either/or >>> thinking -- either graphical or textual. With tk Text (IDLE), it would be >>> possible to tag each (4-space) indent with a color for the compound >>> statememt keywork causing the indent. >>> >> >> Interesting indeed! Tell me if I've understood you correctly. You'd >> display this code: >> >> def func(x): >> for n in range(1, x): >> while n < x: >> if n % 2: >> n = (n + 1) * 3 / 2 >> else: >> n = n * 2 + 3 >> >> with stripes of colour, with the entire first column of spaces all >> tied to the "def", and then the next block of four tied to the "for", >> etc? > > > Exactly.
Take a look at bluej which is for Java. It surrounds different constructs with different coloured rectangles. It also provides UML-ish views of the classes in a project. My students seemed to like it. -- Oscar -- https://mail.python.org/mailman/listinfo/python-list