This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4]: Make "python" start a standard Python prompt


Hi,

Just to throw out another suggestion: make the new command "python-interactive" and alias it to "pi", and leave the old "python" and alias it to "py". Best of both worlds?

Yit
July 25, 2012

On Jul 25, 2012, at 1:43 PM, Tom Tromey wrote:

>>>>>> "Yit" == Khoo Yit Phang <khooyp@cs.umd.edu> writes:
> 
> Yit> My original patch back in January tried to preserve the behavior of
> Yit> "python" based "from_tty": if it was true, "python" would be
> Yit> interactive; otherwise, it would not. But there were several
> Yit> objections to that, I guess since "from_tty" is hard to track (see
> Yit> http://thread.gmane.org/gmane.comp.gdb.patches/71971). The current
> Yit> implementation is based on the discussion then.
> 
> I vaguely remember it.  I have a suspicion that I've changed my mind
> since the old thread, but I didn't go back and read to see :)
> 
> I don't know what would make from_tty hard to track, but ok.
> 
> I just think it is very likely that "python" commands are in .gdbinits
> and other places, and that breaking these would be bad.
> 
> Yit> One more option is to move the Python REPL to "python-repl" and alias
> Yit> it to "py", and leave the old "python" as is. The "py" alias gives a
> Yit> convenient short command, "python-repl" can be used from a script to
> Yit> start a REPL, and the old "python" remains as is.
> 
> Like Matt says, "py" is probably already in use (I feel certain I've
> seen it) and if anything we should do the converse -- alias "py" to
> "python" if a new command goes in.
> 
> "python-repl" would be fine by me.
> 
> Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]