[docs] Section 2.1.2 tutorial question

Sandro Tosi sandro.tosi at gmail.com
Fri Jan 14 19:40:18 CET 2011

Hi Will,

On Fri, Jan 14, 2011 at 01:03, Will Flanagan <will.flanagan at colorado.edu> wrote:
> Hi,
> I am reading the second page of your tutorial:
> http://docs.python.org/tutorial/interpreter.html
> When we arrive at this example in section 2.1.2, it is not clear how to get to the secondary prompt:
>>>> the_world_is_flat = 1
>>>> if the_world_is_flat:
> ...     print "Be careful not to fall off!"
> ...
> Be careful not to fall off!
> If I type "if the_world_is_flat:" and hit enter, an error is generated. How do I get to the secondary prompt for the next line of the example?
> I am this doing this tutorial with a bash shell.

Ok, the problem is that example is expected to be executed inside a
python interpreter, so from your bash prompt type 'python' and you'll
have the interpreter waiting for your commands.

As a general rule, when you see the '>>>' prompt, that means you're
inside a running python interpreter.

Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

More information about the docs mailing list