From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15629 invoked by alias); 25 Jul 2012 17:29:30 -0000 Received: (qmail 15608 invoked by uid 22791); 25 Jul 2012 17:29:28 -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:29:06 +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 68CFAB4015E; Wed, 25 Jul 2012 13:29:04 -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: Date: Wed, 25 Jul 2012 17:29:00 -0000 Cc: Khoo Yit Phang , Tom Tromey , Phil Muldoon , gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <243930AF-3C4E-4CCA-B362-1940E0A038DB@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> To: Matt Rice X-CSD-MailScanner-ID: 68CFAB4015E.A847A 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: 1343842144.56701@sDnJf1bhbK6jesW4uwFlBg 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/msg00556.txt.bz2 Hi, On Jul 25, 2012, at 1:20 PM, Matt Rice wrote: > On Wed, Jul 25, 2012 at 9:58 AM, Khoo Yit Phang wrote: >=20 >> 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 convenie= nt short command, "python-repl" can be used from a script to start a REPL, = and the old "python" remains as is. >>=20 >=20 > FWIW i have used the 'py' alias in scripts numerous times (though > afaict the ones i've released into the wild have been switched to > 'python' before release), though I believe there to be a few examples > of it on stack overflow (kind of hard to search for though). I should mention, "py-repl" and "python" have almost the same behavior when= used with an argument (the differences are just that "py-repl" will also p= rint the result of expressions, and uses gdbpy_print_stack to print errors)= . If "py" is typically used for single-line Python scripts in the wild, the= n I believe that such scripts will still work, just maybe with different co= nsole outputs. Yit July 25, 2012