Discrepancy between Python and Guile wrt exiting the interpreter

Pedro Alves palves@redhat.com
Thu Jan 23 17:39:00 GMT 2020


On 1/23/20 5:32 PM, Pedro Alves wrote:
> On 1/23/20 5:21 PM, Simon Marchi wrote:
>> On 2020-01-23 12:10 p.m., Pedro Alves wrote:
>>> Note that these commands are not direct equivalents.  The guile equivalent
>>> to "pi" which is short for "python" would be "guile", or "gu", and with
>>> that command you get the same behavior as "pi", in the sense that ",q"
>>> doesn't bail you out, you have to type some command and finish with
>>> either Ctrl-D or Ctrl-C to abort.
>>
>> "pi" is not a shorthand for "python", it's a shorthand for "python-interactive",
>> which spawns a Python interpreter prompt/repl.  So I think that and "guile-repl"
>> are quite similar.  It's just that the Python repl doesn't provide a convenient
>> way (other than ctrl-D) so say "exit the repl".
> 
> Indeed, I got confused with that.

And I have to add -- wow, "quit()" exiting gdb is really nasty
in that case.  It's even suggested if you try "quit" without
parens:

 >>> quit
 Use quit() or Ctrl-D (i.e. EOF) to exit

Clearly the embedded use case wasn't considered here.  I think
this should be reported to Python upstream.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list