From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15487 invoked by alias); 30 Jan 2012 03:11:16 -0000 Received: (qmail 15477 invoked by uid 22791); 30 Jan 2012 03:11:14 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from router-304.cs.umd.edu (HELO bacon.cs.umd.edu) (128.8.127.145) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Jan 2012 03:10:55 +0000 Received: from [192.168.32.3] (pool-96-255-160-29.washdc.fios.verizon.net [96.255.160.29]) (Authenticated sender: khooyp) by bacon.cs.umd.edu (Postfix) with ESMTPSA id 65468B4024B; Sun, 29 Jan 2012 22:10:53 -0500 (EST) Subject: Re: Make the "python" command resemble the standard Python interpreter Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Khoo Yit Phang In-Reply-To: Date: Mon, 30 Jan 2012 06:50:00 -0000 Cc: Khoo Yit Phang , Tom Tromey , Paul_Koning@dell.com, gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <09787EF419216C41A903FD14EE5506DD030F1EB39B@AUSX7MCPC103.AMER.DELL.COM> <09787EF419216C41A903FD14EE5506DD030F1EB45D@AUSX7MCPC103.AMER.DELL.COM> To: Doug Evans X-CSD-MailScanner-ID: 65468B4024B.ADB7C X-CSD-MailScanner: Found to be clean X-CSD-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-50, required 5, autolearn=not spam, ALL_TRUSTED -50.00) X-CSD-MailScanner-From: khooyp@cs.umd.edu X-CSD-MailScanner-Watermark: 1328497853.58025@o2rzKXv2y/1QEf56fA7x1w 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/msg00976.txt.bz2 Hi, On Jan 26, 2012, at 12:43 PM, Doug Evans wrote: > On Tue, Jan 24, 2012 at 9:30 AM, Tom Tromey wrote: >>>>>>> "Doug" =3D=3D Doug Evans writes: >>=20 >> Doug> I'm not that comfortable with having the python command having such >> Doug> varying behaviours (especially based on the value of from_tty). >>=20 >> What bad effect do you think it will cause? >=20 > [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. >=20 > With this change I can't do that for something that contains: >=20 > python > foo > end This scenario works perfectly fine in my current implementation based on fr= om_tty: "python\n" starts the Python REPL, "foo\n" runs in the interpreter,= and "end\n" quits the interpreter ("end" by itself in a line is specially = recognized as an alternative to Ctrl-D), which has the same outcome as in t= he script. Yit January 29, 2012