Some feedback about the python scripting feature
Daniel Jacobowitz
drow@false.org
Tue Nov 10 16:53:00 GMT 2009
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
More information about the Gdb
mailing list