From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30444 invoked by alias); 25 Jul 2012 16:58:41 -0000 Received: (qmail 30416 invoked by uid 22791); 25 Jul 2012 16:58:38 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from server-nat-6.cs.umd.edu (HELO bacon.cs.umd.edu) (128.8.127.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jul 2012 16:58:21 +0000 Received: from wireless-206-196-160-203.umd.edu (wireless-206-196-160-203.umd.edu [206.196.160.203]) (Authenticated sender: khooyp) by bacon.cs.umd.edu (Postfix) with ESMTPSA id 387B5B403C8; Wed, 25 Jul 2012 12:58:13 -0400 (EDT) Subject: Re: [PATCH 1/4]: Make "python" start a standard Python prompt Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Khoo Yit Phang In-Reply-To: <87zk6nizl6.fsf@fleche.redhat.com> Date: Wed, 25 Jul 2012 16:58:00 -0000 Cc: Khoo Yit Phang , Phil Muldoon , gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <1C2FC4AD-E6FE-4857-9DE5-FDE5BE006E95@cs.umd.edu> References: <770F6E2B-70F5-4DF9-8E01-BD4F5FDC7AB1@cs.umd.edu> <500F95FB.5060904@redhat.com> <87zk6nizl6.fsf@fleche.redhat.com> To: Tom Tromey X-CSD-MailScanner-ID: 387B5B403C8.A79D2 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: 1343840293.38424@OO1Cv7zlu0i7aA/JR8oNIg 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-07/txt/msg00550.txt.bz2 Hi, On Jul 25, 2012, at 12:18 PM, Tom Tromey wrote: >>>>>> "Phil" =3D=3D Phil Muldoon writes: >=20 > Phil> If a user has a script (or some code in .gdbinit, or whatever ) > Phil> that uses "python" will it break that user's script? >=20 > This is my question as well. >=20 > I think it is ok to change the interactive behavior of the "python" > command, but not the behavior in a script. >=20 > Tom My original patch back in January tried to preserve the behavior of "python= " based "from_tty": if it was true, "python" would be interactive; otherwis= e, it would not. But there were several objections to that, I guess since "= from_tty" is hard to track (see http://thread.gmane.org/gmane.comp.gdb.patc= hes/71971). The current implementation is based on the discussion then. One more option is to move the Python REPL to "python-repl" and alias it to= "py", and leave the old "python" as is. The "py" alias gives a convenient = short command, "python-repl" can be used from a script to start a REPL, and= the old "python" remains as is. Yit July 25, 2012