Re: Python as standard shell? was Re: [RFC] Draft Proposal

Jim Roskind (
Wed, 1 Jun 1994 14:21:55 -0700

> From: (Gary Capell)
> Date: 30 May 1994 02:50:18 +1000
> (Wittenberger) writes:
> > I would like python to be the standard shell of a planned system.
> I thought python would be nice to use as a shell when I first came
> across it (currently use rc), and do use it for scripts (doctype, news
> reader). However, having to type 'ls()' instead of 'ls' drove me batty
> almost immediately, so I gave up on the idea of using python as my
> interactive shell.

It is interesting to note that IF ONLY this were the only thing
stopping you, you *could* work around this problem with a bit of
hackery. The *trick* would be to define an object with an
"interesting" __repr__ function. You could then type:


and get the repr of such an object, which would coincidentally be a
directory listing for the "current" directory :-).

The distinction between function calls and values (or lack thereof) is
interesting in many languages. The repr functions for a class gives a
hint at some of this stuff, but does not completely open pandoras
box. ;-) I often puzzle over related issues when access methods are
compared with "direct" access to member values.


Jim Roskind