Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.062 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'subject:How': 0.09; 'here?': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.16; 'say,': 0.18; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'am,': 0.23; '2015': 0.23; 'header:In- Reply-To:1': 0.24; 'installed': 0.26; 'skip:" 20': 0.26; 'message- id:@mail.gmail.com': 0.28; 'went': 0.28; "i'm": 0.29; 'there.': 0.30; "can't": 0.32; 'older': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'subject:?': 0.34; 'received:google.com': 0.34; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'subject:: ': 0.37; 'missing': 0.37; 'tue,': 0.38; 'version': 0.38; 'test': 0.39; 'does': 0.39; 'seem': 0.39; 'subject:the': 0.40; 'back': 0.61; 'even': 0.61; 'avoid': 0.61; 'better.': 0.66; 'obvious': 0.72; 'subject:get': 0.81; '11:02': 0.84; 'chrisa': 0.84; 'to:none': 0.90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=jqW8bVjYbcYanKbCxGGIP2DMaIjfu3Fh8eLtx5G668A=; b=Ud3jXxpnzoffQTg8v/x/oArquYQghgw8v32s5tK8/oFSYHNvsoCtHLb//bSXAC1fGA R0fWIKj54kJRjPNjb+SCAOuiW0sP1IKGHcDe0sCsooMs7JHDZ53d77XikWVoz3i63xVX MY/OI2u+nZv9sSxqONgHhJOU50NeleWTsHCqZCfbv6ykPIyLxpqhCWmQnlTOBXCnaNC0 AI8vznXZLymoFCagzoGzZcWtyASQNwDqsty3QeY/UvivmRbQVx4NqsE/52MUbZX8NuGM 7Hfj2BDGs3LGCgd7Anmlp8CLyk4al/IS1n7CTT9xRFCw84/r2hXplZTLd1Mw49Ft7HF5 v8hw== MIME-Version: 1.0 X-Received: by 10.50.143.104 with SMTP id sd8mr24725853igb.14.1435022635183; Mon, 22 Jun 2015 18:23:55 -0700 (PDT) In-Reply-To: <5588b01b$0$1649$c3e8da3$5496439d@news.astraweb.com> References: <5588b01b$0$1649$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 23 Jun 2015 11:23:55 +1000 Subject: Re: How do I get the currently installed tab completion function? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435022639 news.xs4all.nl 2853 [2001:888:2000:d::a6]:39961 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93024 On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano wrote: > How do I get the currently installed completer? > > Solutions for any version of Python acceptable, but if they work all the way > back to 2.4 or older, even better. Whether there's a way to avoid the whole try/finally I can't say, but I just went looking for the obvious "readline.get_completer()", and it does seem to be there. Is there something I'm missing here? Found it on 3.4, 3.5, 3.6, and 2.7, but I don't have anything older to test on. ChrisA