This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Some feedback about the python scripting feature
- From: Daniel Jacobowitz <drow at false dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Marcelo Taube <mail dot marcelo dot taube at gmail dot com>, gdb at sourceware dot org
- Date: Tue, 10 Nov 2009 10:38:03 -0500
- Subject: Re: Some feedback about the python scripting feature
- References: <4AF898F3.50908@gmail.com> <4AF8993D.2050507@gmail.com> <m34op2e7xe.fsf@fleche.redhat.com>
On Tue, Nov 10, 2009 at 08:06:05AM -0700, Tom Tromey wrote:
> Marcelo> * *interactive python: *the current python command reads lines using
> Marcelo> gdb normal input instead of the regular python prompt line, making
> Marcelo> some nice features of python unavailable like
> Marcelo> completions-proposals (pressing the tab-key to get the name of a
> Marcelo> function completed) or auto indentation. Maybe running the regular
> Marcelo> python prompt line can be an option.
>
> You should be able to easily enter the Python repl, though offhand I
> don't know how.
I thought it was easy to get the actual repl... but it isn't. There
is a C function for it, but not a Python method.
However, there's a very good simulacrum:
py import code
py code.InteractiveConsole().interact()
Send EOF to exit.
I don't know if it has completion or automatic indentation, because no
version of Python I have installed does either :-) Is this new?
--
Daniel Jacobowitz
CodeSourcery