From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6849 invoked by alias); 10 Nov 2009 19:07:01 -0000 Received: (qmail 6841 invoked by uid 22791); 10 Nov 2009 19:07:00 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Nov 2009 19:06:55 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 78FC710D7F; Tue, 10 Nov 2009 19:06:53 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 64FD210D7C; Tue, 10 Nov 2009 19:06:53 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1N7w3I-0004Q1-Ea; Tue, 10 Nov 2009 14:06:52 -0500 Date: Wed, 11 Nov 2009 02:00:00 -0000 From: Daniel Jacobowitz To: Marcelo Taube Cc: gdb@sourceware.org Subject: Re: Some feedback about the python scripting feature Message-ID: <20091110190652.GA16417@caradoc.them.org> Mail-Followup-To: Marcelo Taube , gdb@sourceware.org References: <4AF898F3.50908@gmail.com> <4AF8993D.2050507@gmail.com> <20091110153803.GA26779@caradoc.them.org> <4AF9B5AE.6070004@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AF9B5AE.6070004@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00125.txt.bz2 On Tue, Nov 10, 2009 at 08:49:18PM +0200, Marcelo Taube wrote: > Hello, > >I don't know if it has completion or automatic indentation, because no > >version of Python I have installed does either :-) Is this new? > I am sorry, i guess i was "slightly" wrong. > The completion is not automatic, someone added it to my working > environment and i just thought it was part of the default behaiviour. > But it should be very easy to add to any other environment, i saw > that the next three lines should do the job: > > >>>import rlcompleter > >>>import readline > >>>readline.parse_and_bind("tab: complete") This "works" in GDB... but it doesn't do anything you want it to do. It changes the tab completion used by the GDB prompt! Whoops. > In spite of that, i still think that the python shell has advantages, > there is a difference between having direct response to the commands > executed in python and having to imagine that the syntax is ok till > you finish writing all the code. Also mixing the history of lines > insterted in python context and lines inserted in gdb language is > kind of bothering, they cannot really be reused. That should work with the command I showed you, at least to some extent. -- Daniel Jacobowitz CodeSourcery