[docs] Section 2.1.2 tutorial question

Will Flanagan will.flanagan at Colorado.EDU
Sat Jan 15 00:55:35 CET 2011


Hi Sandro,

Thank you for the reply.

I was in fact inside a python interpreter (that I accessed from a bash  
shell).

I am not sure why I wasn't arriving at the secondary prompt yesterday  
when trying that example (and others), but it works fine today after  
retrying. Sorry about the inconvenience.

Thanks,
Will

On Jan 14, 2011, at 12:40 PM, Sandro Tosi wrote:

> 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.
>
> Cheers,
> -- 
> 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