From owner-freebsd-python@FreeBSD.ORG Thu Oct 21 13:11:40 2010 Return-Path: Delivered-To: freebsd-python@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF0A91065670 for ; Thu, 21 Oct 2010 13:11:40 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD208FC1C for ; Thu, 21 Oct 2010 13:11:39 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o9LDBN2M037400; Thu, 21 Oct 2010 15:11:38 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o9LDBNSp037399; Thu, 21 Oct 2010 15:11:23 +0200 (CEST) (envelope-from olli) Date: Thu, 21 Oct 2010 15:11:23 +0200 (CEST) Message-Id: <201010211311.o9LDBNSp037399@lurza.secnetix.de> From: Oliver Fromme To: freebsd-python@FreeBSD.ORG X-Newsgroups: list.freebsd-python User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.5 (lurza.secnetix.de [127.0.0.1]); Thu, 21 Oct 2010 15:11:39 +0200 (CEST) Cc: Subject: python27 + readline: can't bind ^U X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-python@FreeBSD.ORG List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 13:11:40 -0000 Hi, I'm using python27 on FreeBSD 8.1. I would like to change the behaviour of ^U at the Python prompt. By default, it deletes everything to the left of the cursor, but I want it to delete the _whole_ line, regardless of the current cursor position. Nothing of the following works: - adding one of these lines to ~/.inputrc: "\C-u": kill-whole-line Control-u: kill-whole-line - adding "import readline" and one of these lines to ~/.pythonstartup: readline.parse_and_bind (r'"\C-u": kill-whole-line') readline.parse_and_bind (r'Control-u: kill-whole-line') The desired binding is never executed. When I run the "dump-functions" command, kill-whole-line is listed as unbound, and \C-u is still bound to unix-line-discard. Other key bindings that I added to ~/.pythonstartup and ~/.inputrc work fine. Only Control-U refuses to be bound to anything else than unix-line-discard. What am I doing wrong? Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them.