From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8770 invoked by alias); 26 Jan 2012 17:43:34 -0000 Received: (qmail 8760 invoked by uid 22791); 26 Jan 2012 17:43:33 -0000 X-SWARE-Spam-Status: No, hits=-3.0 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; Thu, 26 Jan 2012 17:43:20 +0000 Received: by vcbfl11 with SMTP id fl11so689917vcb.0 for ; Thu, 26 Jan 2012 09:43:19 -0800 (PST) Received: by 10.220.151.5 with SMTP id a5mr1711826vcw.41.1327599799790; Thu, 26 Jan 2012 09:43:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.151.5 with SMTP id a5mr1711818vcw.41.1327599799706; Thu, 26 Jan 2012 09:43:19 -0800 (PST) Received: by 10.220.229.1 with HTTP; Thu, 26 Jan 2012 09:43:19 -0800 (PST) In-Reply-To: References: <09787EF419216C41A903FD14EE5506DD030F1EB39B@AUSX7MCPC103.AMER.DELL.COM> <09787EF419216C41A903FD14EE5506DD030F1EB45D@AUSX7MCPC103.AMER.DELL.COM> Date: Thu, 26 Jan 2012 18:28:00 -0000 Message-ID: Subject: Re: Make the "python" command resemble the standard Python interpreter From: Doug Evans To: Tom Tromey Cc: Khoo Yit Phang , Paul_Koning@dell.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-01/txt/msg00915.txt.bz2 On Tue, Jan 24, 2012 at 9:30 AM, Tom Tromey wrote: >>>>>> "Doug" == Doug Evans writes: > > Doug> I'm not that comfortable with having the python command having such > Doug> varying behaviours (especially based on the value of from_tty). > > What bad effect do you think it will cause? [for example] Suppose I want to cut-n-paste some lines from a script into my session? Maybe as a quick hack or maybe to test something out or whatever. With this change I can't do that for something that contains: python foo end As I say, having "python" invoke the python repl *is* the more intuitive thing to do, so add a new command, python-foo, that retains/provides the old "python ... end" behaviour and I'm ok. [IWBN to also deprecate and eventually remove support for "python ... end", but that's a teensy bit harder, 1/2 :-).] OTOH, I don't mind just adding "python-foo" to invoke the python repl. If someone doesn't want to type all that s/he can always do "alias pyfoo = python-foo" (or whatever). We could even provide our own alias (if we could come up with something better than "python" :-)).