Interactive Shell?

Andrew Burton tuglyraisin at aol.commcast
Sun Feb 1 21:59:42 EST 2004


Allow me a paragraph or two to apply a context to the question I want to ask
here.

Many moons past, when I got "Learning Python" from O'Reilly and first tried to
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,
I almost started a flame war when I asked about commandline arguments in Lisp.
It took about a week of reading, replying, and sniping before I understood the
fact that Lisp, ideally, was run from an interactive shell. Such a concept was
a complete paradigm shift from my Perl, C, and Visual Basic experiences that I
had no frame of reference for it.

So, skipping ahead to late last year and this year, after a few months of Lisp
and a smattering of Cobol (learning about the importance of indentation), I've
come back to try and learn Python. Now that I am back (have arrived), having
learned what I have from Lisp, I understand the >>> prompt in "Learning Python"
and I have fun using the interactive shell, playing with strings and functions.

However, in the interest of understanding Python, making sure I grasp the
mindset of it, I wanted to ask a couple of general questions. They are general,
and I know there's no "one true answer" for them. The idea is just to get some
answers to offer me a perspective on ways to view Python. All answers and posts
are appreciated greatly. Anyway, here it is...

Which is the best was to use Python: from the interactive shell, as a scripting
language, or as the Python.h library with C? Is the interactive shell there for
anything beyond prototyping code?

Andrew Burton - tuglyraisin at aol dot com
Felecia Station on Harvestgain - http://www.darkbeast.com/
(setq line "I will not tie up my muse.")
(defun punish (x) (if (> x 0) (progn (format t "~A~%" line) (punish (- x 1)))))
(punish 500)



More information about the Python-list mailing list