From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17314 invoked by alias); 6 Feb 2012 20:34:11 -0000 Received: (qmail 17254 invoked by uid 22791); 6 Feb 2012 20:34:10 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Feb 2012 20:33:51 +0000 Received: by vcbf13 with SMTP id f13so5035852vcb.0 for ; Mon, 06 Feb 2012 12:33:50 -0800 (PST) Received: by 10.220.152.146 with SMTP id g18mr11963031vcw.30.1328560430631; Mon, 06 Feb 2012 12:33:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.152.146 with SMTP id g18mr11962969vcw.30.1328560428877; Mon, 06 Feb 2012 12:33:48 -0800 (PST) Received: by 10.220.162.7 with HTTP; Mon, 6 Feb 2012 12:33:48 -0800 (PST) In-Reply-To: <09787EF419216C41A903FD14EE5506DD0310E29D2F@AUSX7MCPC103.AMER.DELL.COM> References: <09787EF419216C41A903FD14EE5506DD030F1EB39B@AUSX7MCPC103.AMER.DELL.COM> <09787EF419216C41A903FD14EE5506DD030F1EB45D@AUSX7MCPC103.AMER.DELL.COM> <09787EF419216C41A903FD14EE5506DD0310E29D2F@AUSX7MCPC103.AMER.DELL.COM> Date: Mon, 06 Feb 2012 20:34:00 -0000 Message-ID: Subject: Re: Make the "python" command resemble the standard Python interpreter From: Doug Evans To: Paul_Koning@dell.com Cc: khooyp@cs.umd.edu, tromey@redhat.com, gdb-patches@sourceware.org X-System-Of-Record: true Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00068.txt.bz2 On Mon, Feb 6, 2012 at 12:13 PM, 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 "", 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". http://en.wikipedia.org/wiki/REPL