Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16543

Re: Passing along cmd.Cmd completion to contained class

Newsgroups comp.lang.python
Date 2011-12-02 07:01 -0800
References <mailman.3214.1322798548.27778.python-list@python.org>
Subject Re: Passing along cmd.Cmd completion to contained class
From Miki Tebeka <miki.tebeka@gmail.com>
Message-ID <mailman.3222.1322838104.27778.python-list@python.org> (permalink)

Show all headers | View raw


This is not tested, but maybe it'll work :)

def complete(self, text, state):
    if text.startswith('config):
        return self.config.complete(text, state)
    return Cmd.complete(self, text, state)

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Passing along cmd.Cmd completion to contained class Tim Chase <python.list@tim.thechases.com> - 2011-12-01 22:02 -0600
  Re: Passing along cmd.Cmd completion to contained class Miki Tebeka <miki.tebeka@gmail.com> - 2011-12-02 07:01 -0800
  Re: Passing along cmd.Cmd completion to contained class Miki Tebeka <miki.tebeka@gmail.com> - 2011-12-02 07:01 -0800

csiph-web