This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4]: Make "python" start a standard Python prompt
Hi,
On Jul 25, 2012, at 12:18 PM, Tom Tromey wrote:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
>
> Phil> If a user has a script (or some code in .gdbinit, or whatever )
> Phil> that uses "python" will it break that user's script?
>
> This is my question as well.
>
> I think it is ok to change the interactive behavior of the "python"
> command, but not the behavior in a script.
>
> Tom
My original patch back in January tried to preserve the behavior of "python" based "from_tty": if it was true, "python" would be interactive; otherwise, it would not. But there were several objections to that, I guess since "from_tty" is hard to track (see http://thread.gmane.org/gmane.comp.gdb.patches/71971). The current implementation is based on the discussion then.
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 convenient short command, "python-repl" can be used from a script to start a REPL, and the old "python" remains as is.
Yit
July 25, 2012