[Tutor] pyhton (fwd)

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Thu, 27 Dec 2001 20:29:23 -0800 (PST)

On Thu, 27 Dec 2001, Danny Yoo wrote:

> i tried that but i just sead
> ###
> >>>1
> >>>print 2
> >>>2
> >>>print 3
> >>>3
>           if you know whats wrong please help me

Ok, I think I understand a little better.  Yes, what you're running is
Python's "interpreter" --- it will run commands the moment you type them
in.  It's analogous to an interactive calculator, just much more powerful.

The interpreter is good for experimentation, but it's not meant for
writing whole programs.  What's happening is that, as soon as you enter in
a command, Python executes it --- that's why it appears that the
interpreter is interrupting you.

Instead, you'll probably want to write your program in a text file, and
then run Python over that text file.  You can write text files using
Notepad, but there's a much nicer text editor called IDLE that should be
installed on your computer.

Here's a small introduction that may help you:


I hope it clears things up!  If you have more questions, please email