From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5967 invoked by alias); 25 Jul 2012 17:55:53 -0000 Received: (qmail 5954 invoked by uid 22791); 25 Jul 2012 17:55:52 -0000 X-SWARE-Spam-Status: No, hits=-2.3 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 17:55:39 +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 67972B4015E; Wed, 25 Jul 2012 13:55:37 -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: <874novivob.fsf@fleche.redhat.com> Date: Wed, 25 Jul 2012 17:55:00 -0000 Cc: Khoo Yit Phang , Phil Muldoon , gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <9DB9F174-129C-4C4A-9708-53A1D521251A@cs.umd.edu> References: <770F6E2B-70F5-4DF9-8E01-BD4F5FDC7AB1@cs.umd.edu> <500F95FB.5060904@redhat.com> <87zk6nizl6.fsf@fleche.redhat.com> <1C2FC4AD-E6FE-4857-9DE5-FDE5BE006E95@cs.umd.edu> <874novivob.fsf@fleche.redhat.com> To: Tom Tromey X-CSD-MailScanner-ID: 67972B4015E.A839D 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: 1343843737.5668@ffoegVnQRlOVewWfc7Dv4A 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/msg00563.txt.bz2 Hi, Just to throw out another suggestion: make the new command "python-interact= ive" and alias it to "pi", and leave the old "python" and alias it to "py".= Best of both worlds? Yit July 25, 2012 On Jul 25, 2012, at 1:43 PM, Tom Tromey wrote: >>>>>> "Yit" =3D=3D Khoo Yit Phang writes: >=20 > Yit> My original patch back in January tried to preserve the behavior of > Yit> "python" based "from_tty": if it was true, "python" would be > Yit> interactive; otherwise, it would not. But there were several > Yit> objections to that, I guess since "from_tty" is hard to track (see > Yit> http://thread.gmane.org/gmane.comp.gdb.patches/71971). The current > Yit> implementation is based on the discussion then. >=20 > I vaguely remember it. I have a suspicion that I've changed my mind > since the old thread, but I didn't go back and read to see :) >=20 > I don't know what would make from_tty hard to track, but ok. >=20 > I just think it is very likely that "python" commands are in .gdbinits > and other places, and that breaking these would be bad. >=20 > Yit> One more option is to move the Python REPL to "python-repl" and alias > Yit> it to "py", and leave the old "python" as is. The "py" alias gives a > Yit> convenient short command, "python-repl" can be used from a script to > Yit> start a REPL, and the old "python" remains as is. >=20 > Like Matt says, "py" is probably already in use (I feel certain I've > seen it) and if anything we should do the converse -- alias "py" to > "python" if a new command goes in. >=20 > "python-repl" would be fine by me. >=20 > Tom