@skip_doctest
def complete(self, text, line=None, cursor_pos=None):
    "Return the completed text and a list of completions.\n\n        Parameters\n        ----------\n        text : string\n            A string of text to be completed on.  It can be given as empty and\n            instead a line/position pair are given.  In this case, the\n            completer itself will split the line like readline does.\n        line : string, optional\n            The complete line that text is part of.\n        cursor_pos : int, optional\n            The position of the cursor on the input line.\n\n        Returns\n        -------\n        text : string\n            The actual text that was completed.\n        matches : list\n            A sorted list with all possible completions.\n\n        Notes\n        -----\n        The optional arguments allow the completion to take more context into\n        account, and are part of the low-level completion API.\n\n        This is a wrapper around the completion mechanism, similar to what\n        readline does at the command line when the TAB key is hit.  By\n        exposing it as a method, it can be used by other non-readline\n        environments (such as GUIs) for text completion.\n\n        Examples\n        --------\n        In [1]: x = 'hello'\n\n        In [2]: _ip.complete('x.l')\n        Out[2]: ('x.l', ['x.ljust', 'x.lower', 'x.lstrip'])\n        "
    with self.builtin_trap:
        return self.Completer.complete(text, line, cursor_pos)
Return the completed text and a list of completions.

Parameters
----------
text : string
    A string of text to be completed on.  It can be given as empty and
    instead a line/position pair are given.  In this case, the
    completer itself will split the line like readline does.
line : string, optional
    The complete line that text is part of.
cursor_pos : int, optional
    The position of the cursor on the input line.

Returns
-------
text : string
    The actual text that was completed.
matches : list
    A sorted list with all possible completions.

Notes
-----
The optional arguments allow the completion to take more context into
account, and are part of the low-level completion API.

This is a wrapper around the completion mechanism, similar to what
readline does at the command line when the TAB key is hit.  By
exposing it as a method, it can be used by other non-readline
environments (such as GUIs) for text completion.

Examples
--------
In [1]: x = 'hello'

In [2]: _ip.complete('x.l')
Out[2]: ('x.l', ['x.ljust', 'x.lower', 'x.lstrip'])
@skip_doctest
def complete(self, text, line=None, cursor_pos=None):
    "Return the completed text and a list of completions.\n\n        Parameters\n        ----------\n        text : string\n            A string of text to be completed on.  It can be given as empty and\n            instead a line/position pair are given.  In this case, the\n            completer itself will split the line like readline does.\n        line : string, optional\n            The complete line that text is part of.\n        cursor_pos : int, optional\n            The position of the cursor on the input line.\n\n        Returns\n        -------\n        text : string\n            The actual text that was completed.\n        matches : list\n            A sorted list with all possible completions.\n\n        Notes\n        -----\n        The optional arguments allow the completion to take more context into\n        account, and are part of the low-level completion API.\n\n        This is a wrapper around the completion mechanism, similar to what\n        readline does at the command line when the TAB key is hit.  By\n        exposing it as a method, it can be used by other non-readline\n        environments (such as GUIs) for text completion.\n\n        Examples\n        --------\n        In [1]: x = 'hello'\n\n        In [2]: _ip.complete('x.l')\n        Out[2]: ('x.l', ['x.ljust', 'x.lower', 'x.lstrip'])\n        "
    with self.builtin_trap:
        return self.Completer.complete(text, line, cursor_pos)