Re: Make the "python" command resemble the standard Python interpreter

Doug Evans
2012-02-06T20:34:11Z

On Mon, Feb 6, 2012 at 12:13 PM, <Paul_Koning@dell.com> wrote:
> End of block is defined by smaller indent.

Here's a cut-n-paste of an experiment I just did.

[dje@annie ~]$ python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> if 0 == 1:
... print "foo"
... print "bar"
File "<stdin>", line 3
print "bar"
^
SyntaxError: invalid syntax
>>>

In a script Python can see the change in indentation.
I gather in interactive mode things work differently, otherwise how
can I terminate the `if' without invoking something new.

btw, "repl" == "Read Eval Print Loop".