Interactive Shell?

Alan Gauld alan.gauld at btinternet.com
Mon Feb 2 03:45:38 EST 2004


On 02 Feb 2004 02:59:42 GMT, tuglyraisin at aol.commcast (Andrew
Burton) wrote:
> learn Python, I saw what I know see whenever I open Python up, the infamous >>>
> prompt. At the time, it confused me, and I shelved the book. Fewer moons past,
> as I fell into a hobby of reading Lisp web pages and lurking in comp.lang.lisp,

A good habit to fall into IMHO :-)

However in terms of how best to view the Python >>> prompt I'd
suggest a wee excursion into Smalltalk.

The >>> prompt is very similar to the scratchpad mode of
operation in the Smalltalk environment. You create classes and
methods etc in the browser then test them out in the scratchpad.
You want to check a bit of syntax, try it in the scratchpad.

The >>> prompt is used in a similar way (by me at least!). As I
program in <insert favourite text editor here> I dip into the >>>
prompt in a separate window to check out ideas, syntax, and to
test the code I'm writing, import/reloading it, and by
instantiating classes etc and firing up the methods with test
params.

If you do objects in Python the >>> prompt makes a great testbed
for checking them out as you write them.
 
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Python-list mailing list