We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PromptContent
1 parent 58ae9cb commit 8bd3cd2Copy full SHA for 8bd3cd2
Lib/_pyrepl/content.py
@@ -25,6 +25,22 @@ class ContentFragment:
25
26
@dataclass(frozen=True, slots=True)
27
class PromptContent:
28
+ """The prompt split into leading full-width lines and an inline portion.
29
+
30
+ For the common ``">>> "`` prompt (no newlines)::
31
32
+ >>> def greet(name):
33
+ ╰─╯
34
+ text=">>> ", width=4, leading_lines=()
35
36
+ If ``sys.ps1`` contains newlines, e.g. ``"Python 3.13\\n>>> "``::
37
38
+ Python 3.13 ← leading_lines[0]
39
40
41
+ text=">>> ", width=4
42
+ """
43
44
leading_lines: tuple[ContentFragment, ...]
45
text: str
46
width: int
0 commit comments