Interactive mode under DOS?

Lie Ryan lie.1296 at gmail.com
Sun Oct 24 06:21:07 EDT 2010


On 10/24/10 21:37, huisky wrote:
> Hi,
> 
> I'm trying to use the interactive mode under DOS for Python 2.7. As a
> newbie, I do NOT know what is the following problem:
> 
>>>> world_is_flat=1
>>>> if world_is_flat:
> .. . . print "be carefule to be not fall out!"
>     File "<stdin>", line 2
>       print "be carefule to be not fall out!"
>               ^
> IndenatationError : expected an idented block
>>>>
> 
> Enybody knows how to fix this simple issue?
> 

Python is indentation-sensitive, you need to add some whitespace to the
line after an if-statement:

>>> world_is_flat=1
>>> if world_is_flat:<ENTER>
...     print "be carefule to be not fall out!"<ENTER>
... <ENTER>
be carefule to be not fall out!
>>>



More information about the Python-list mailing list