[Tutor] Unix shell vs Python shell
dyoo at hkn.eecs.berkeley.edu
Thu Feb 12 03:18:35 EST 2004
On Wed, 11 Feb 2004, Christopher Spears wrote:
> What is the main difference between the Unix shell and Idle? I'm asking
> this because I discovered the os module, which has commands that look
> suspiciously like utilities in Unix. In Unix, the shell acts like a
> traffic cop and calls up needed utilities. Does Idle do the same?
Conceptually, yes, it's possible to make an analogy here. Let's see:
(Unix : /bin/sh) :: (Python : IDLE)
I think it might go something like this. *grin*
IDLE is an interactive environment for playing around with the Python
system. It's a little more, because it also includes a text editor, but
otherwise, it's very analogous to the way Unix provides access through
shells. It's a layer that we work on top of, and that layer gives us a
more pleasant view of things.
To take advantage of the "shell" analogy even further: you can replace
IDLE with other environments as you get more familiar with Python.
There's a whole bunch of them listed here:
(I personally use either the "toplevel" bare environment that Python
provides if you run it directly off a terminal (no windows, just the '>>>'
prompt), and I also use the "python-mode" within the 'Emacs' text
We can think of Python as a system that lives on top of the native
======= vs. ========
And the 'os' module allows us to dig closer into the territory claimed by
the native operating system. But the 'os' module should also work well on
Hope this makes sense!
More information about the Tutor