From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46041 invoked by alias); 23 Jan 2020 17:37:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 46033 invoked by uid 89); 23 Jan 2020 17:37:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1190 X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jan 2020 17:37:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579801027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yx6iy43dupRAyYRdJsEOZaMhfOz3Vbyaoq3bi92Duvk=; b=ItIDHkBSCovBV3xJkGd4sBl/vUwWv8NCTEq6/3rdrrMdTPGmKWxVOYhVnW6dXPOQCIvlNd NZpFFfhuOhVQWhKsySCqwPRcIcJZt3JktSytCYbS8SxJGAAXKWxs17CQlT6AowTq+Sg86w +KAHMkixPPV55PWZotDxxSEkimU2USc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-MuBCq2FoN0CGYcuKfJg4IQ-1; Thu, 23 Jan 2020 12:36:34 -0500 Received: by mail-wm1-f72.google.com with SMTP id n17so987164wmk.1 for ; Thu, 23 Jan 2020 09:36:31 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f909:7b00:56ee:75ff:fe8d:232b? ([2001:8a0:f909:7b00:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id q3sm3308736wmj.38.2020.01.23.09.36.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jan 2020 09:36:29 -0800 (PST) Subject: Re: Discrepancy between Python and Guile wrt exiting the interpreter From: Pedro Alves To: Simon Marchi , Eli Zaretskii , gdb-patches@sourceware.org References: <83a76l10r6.fsf@gnu.org> <9684975c-324f-b26b-de87-6d37c0d8d08a@redhat.com> <081e7258-3fb8-6231-ca25-f2d18d255645@simark.ca> Message-ID: Date: Thu, 23 Jan 2020 17:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-01/txt/msg00738.txt.bz2 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