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 1:20 PM, Matt Rice wrote:
> On Wed, Jul 25, 2012 at 9:58 AM, Khoo Yit Phang <khooyp@cs.umd.edu> wrote:
>
>> 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.
>>
>
> FWIW i have used the 'py' alias in scripts numerous times (though
> afaict the ones i've released into the wild have been switched to
> 'python' before release), though I believe there to be a few examples
> of it on stack overflow (kind of hard to search for though).
I should mention, "py-repl" and "python" have almost the same behavior when used with an argument (the differences are just that "py-repl" will also print the result of expressions, and uses gdbpy_print_stack to print errors). If "py" is typically used for single-line Python scripts in the wild, then I believe that such scripts will still work, just maybe with different console outputs.
Yit
July 25, 2012