MCPcopy Create free account
hub / github.com/ipython/ipython / split_line

Method split_line

IPython/core/completer.py:559–563  ·  view source on GitHub ↗

Split a line of text with a cursor at the given position.

(self, line, cursor_pos=None)

Source from the content-addressed store, hash-verified

557 self._delim_expr = expr
558
559 def split_line(self, line, cursor_pos=None):
560 """Split a line of text with a cursor at the given position.
561 """
562 l = line if cursor_pos is None else line[:cursor_pos]
563 return self._delim_re.split(l)[-1]
564
565
566

Callers 2

_completeMethod · 0.80
check_line_splitFunction · 0.80

Calls

no outgoing calls

Tested by 1

check_line_splitFunction · 0.64