Files
ServerSync/lib/prompt_toolkit/output/__pycache__/base.cpython-314.pyc

75 lines
23 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i<EFBFBD> <00><01><><00>Rt^RIHt^RIHtHt^RIHt^RIH t ^RI
H t ^RI H t ^RIHtRR .t!R
R]R 7t!R R ]4tR #)z
Interface for an output.
)<01> annotations)<02>ABCMeta<74>abstractmethod)<01>TextIO)<01> CursorShape<70><01>Size)<01>Attrs)<01>
ColorDepth<EFBFBD>Output<75> DummyOutputc<01><00>]tRt^t$RtRtR]R&]RRl4t]RRl4t ]R R
l4t
]R R l4t ]R Rl4t ]RRl4t ]RRl4t]RRl4t]RRl4t]RRl4t]RRl4t]RRl4t]RRl4t]RR l4t]R!R"l4t]R#R$l4t]R%R&l4t]R'R(l4t]RPR)R*ll4t]R+R,l4t]R-R.l4t]R/R0l4t]R1R2l4t]R3R4l4t]R5R6l4t ]R7R8l4t!]R9R:l4t"R;R<lt#]$R=R>l4t%]R?R@l4t&RARBlt'RCRDlt(RERFlt)RGRHlt*RIRJlt+RKRLlt,]RMRNl4t-ROt.R#)Qr z<>
Base class defining the output interface for a
:class:`~prompt_toolkit.renderer.Renderer`.
Actual implementations are
:class:`~prompt_toolkit.output.vt100.Vt100_Output` and
:class:`~prompt_toolkit.output.win32.Win32Output`.
Nz TextIO | None<6E>stdoutc<01><00>V^8<>dQhRR/#<00><03><00>return<72>int<6E>)<01>formats"<22>A/tmp/pip-target-wqrk2shd/lib/python/prompt_toolkit/output/base.py<70> __annotate__<5F>Output.__annotate__#s<00><00>K<01>K<01><03>K<01>c <0A><00>R#)z@Return the file descriptor to which we can write for the output.Nr<00><01>selfs&r<00>fileno<6E> Output.fileno"<00><00>rc<01><00>V^8<>dQhRR/#<00>rr<00>strr)rs"rrr's<00><00> <0C> <0C>#<23> rc <0A><00>R#)z<>
Return the encoding for this output, e.g. 'utf-8'.
(This is used mainly to know which characters are supported by the
output the data, so that the UI can provide alternatives, when
required.)
Nrrs&r<00>encoding<6E>Output.encoding&rrc<01> <00>V^8<>dQhRRRR/#<00>r<00>datar"r<00>Noner)rs"rrr0s<00><00>J<01>J<01>#<23>J<01>$<24>Jrc <0A><00>R#)z?Write text (Terminal escape sequences will be removed/escaped.)Nr<00>rr(s&&r<00>write<74> Output.write/rrc<01> <00>V^8<>dQhRRRR/#r'r)rs"rrr4s<00><00><16><16>c<EFBFBD><16>d<EFBFBD>rc <0A><00>R#)z Write text.Nrr+s&&r<00> write_raw<61>Output.write_raw3rrc<01> <00>V^8<>dQhRRRR/#<00>r<00>titler"rr)r)rs"rrr8s<00><00><1E><1E>s<EFBFBD><1E>t<EFBFBD>rc <0A><00>R#)zSet terminal title.Nr<00>rr4s&&r<00> set_title<6C>Output.set_title7rrc<01><00>V^8<>dQhRR/#<00>rrr)r)rs"rrr<s<00><00>:<3A>:<3A>T<EFBFBD>:rc <0A><00>R#)z/Clear title again. (or restore previous title.)Nrrs&r<00> clear_title<6C>Output.clear_title;rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr@s<00><00>,<2C>,<2C>t<EFBFBD>,rc <0A><00>R#)z!Write to output stream and flush.Nrrs&r<00>flush<73> Output.flush?rrc<01><00>V^8<>dQhRR/#r:r)rs"rrrDs<00><00> <0C> <0C>d<EFBFBD> rc <0A><00>R#)zK
Erases the screen with the background color and moves the cursor to
home.
Nrrs&r<00> erase_screen<65>Output.erase_screenCrrc<01><00>V^8<>dQhRR/#r:r)rs"rrrKs<00><00>M<01>M<01><04>Mrc <0A><00>R#)zBGo to the alternate screen buffer. (For full screen applications).Nrrs&r<00>enter_alternate_screen<65>Output.enter_alternate_screenJrrc<01><00>V^8<>dQhRR/#r:r)rs"rrrOs<00><00>-<2D>-<2D>t<EFBFBD>-rc <0A><00>R#)z"Leave the alternate screen buffer.Nrrs&r<00>quit_alternate_screen<65>Output.quit_alternate_screenNrrc<01><00>V^8<>dQhRR/#r:r)rs"rrrSs<00><00><18><18>d<EFBFBD>rc <0A><00>R#)z Enable mouse.Nrrs&r<00>enable_mouse_support<72>Output.enable_mouse_supportRrrc<01><00>V^8<>dQhRR/#r:r)rs"rrrWs<00><00><19><19>t<EFBFBD>rc <0A><00>R#)zDisable mouse.Nrrs&r<00>disable_mouse_support<72>Output.disable_mouse_supportVrrc<01><00>V^8<>dQhRR/#r:r)rs"rrr[s<00><00> <0C> <0C>4<EFBFBD> rc <0A><00>R#)zI
Erases from the current cursor position to the end of the current line.
Nrrs&r<00>erase_end_of_line<6E>Output.erase_end_of_lineZrrc<01><00>V^8<>dQhRR/#r:r)rs"rrras<00><00> <0C> <0C>D<EFBFBD> rc <0A><00>R#)zK
Erases the screen from the current line down to the bottom of the
screen.
Nrrs&r<00>
erase_down<EFBFBD>Output.erase_down`rrc<01><00>V^8<>dQhRR/#r:r)rs"rrrhs<00><00>.<2E>.<2E>$<24>.rc <0A><00>R#)z#Reset color and styling attributes.Nrrs&r<00>reset_attributes<65>Output.reset_attributesgrrc<01>$<00>V^8<>dQhRRRRRR/#<00>r<00>attrsr <00> color_depthr
rr)r)rs"rrrls!<00><00>0<>0<>E<EFBFBD>0<>
<EFBFBD>0<>t<EFBFBD>0rc <0A><00>R#)z%Set new color and styling attributes.Nr<00>rrdres&&&r<00>set_attributes<65>Output.set_attributeskrrc<01><00>V^8<>dQhRR/#r:r)rs"rrrps<00><00>&<26>&<26>$<24>&rc <0A><00>R#)zDisable auto line wrapping.Nrrs&r<00>disable_autowrap<61>Output.disable_autowraporrc<01><00>V^8<>dQhRR/#r:r)rs"rrrts<00><00>%<25>%<25><14>%rc <0A><00>R#)zEnable auto line wrapping.Nrrs&r<00>enable_autowrap<61>Output.enable_autowrapsrrc<01>$<00>V^8<>dQhRRRRRR/#<00>r<00>rowr<00>columnrr)r)rs"rrrxs!<00><00> <20> <20>s<EFBFBD> <20><03> <20>D<EFBFBD> rc <0A><00>R#)zMove cursor position.Nr<00>rrtrus&&&r<00> cursor_goto<74>Output.cursor_gotowrrc<01> <00>V^8<>dQhRRRR/#<00>r<00>amountrrr)r)rs"rrr|s<00><00>)<29>)<29><03>)<29><04>)rc <0A><00>R#)zMove cursor `amount` place up.Nr<00>rr|s&&r<00> cursor_up<75>Output.cursor_up{rrc<01> <00>V^8<>dQhRRRR/#r{r)rs"rrr<00>s<00><00>+<2B>+<2B>#<23>+<2B>$<24>+rc <0A><00>R#)z Move cursor `amount` place down.Nrr~s&&r<00> cursor_down<77>Output.cursor_downrrc<01> <00>V^8<>dQhRRRR/#r{r)rs"rrr<00>s<00><00>.<2E>.<2E>S<EFBFBD>.<2E>T<EFBFBD>.rc <0A><00>R#)z#Move cursor `amount` place forward.Nrr~s&&r<00>cursor_forward<72>Output.cursor_forward<72>rrc<01> <00>V^8<>dQhRRRR/#r{r)rs"rrr<00>s<00><00>/<2F>/<2F>c<EFBFBD>/<2F>d<EFBFBD>/rc <0A><00>R#)z$Move cursor `amount` place backward.Nrr~s&&r<00>cursor_backward<72>Output.cursor_backward<72>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00><00><00><00><17><17>T<EFBFBD>rc <0A><00>R#)z Hide cursor.Nrrs&r<00> hide_cursor<6F>Output.hide_cursor<6F>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00>r<>rc <0A><00>R#)z Show cursor.Nrrs&r<00> show_cursor<6F>Output.show_cursor<6F>rrc<01> <00>V^8<>dQhRRRR/#<00>r<00> cursor_shaperrr)r)rs"rrr<00>s<00><00>8<>8<>[<5B>8<>T<EFBFBD>8rc <0A><00>R#)z-Set cursor shape to block, beam or underline.Nr<00>rr<>s&&r<00>set_cursor_shape<70>Output.set_cursor_shape<70>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00>s<00><00><1E><1E>D<EFBFBD>rc <0A><00>R#)zReset cursor shape.Nrrs&r<00>reset_cursor_shape<70>Output.reset_cursor_shape<70>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00>s<00><00> <0C> <0C>T<EFBFBD> rc <0A><00>R#)z8
Asks for a cursor position report (CPR).
(VT100 only.)
Nrrs&r<00> ask_for_cpr<70>Output.ask_for_cpr<70>rrc<01><00>V^8<>dQhRR/#)rr<00>boolr)rs"rrr<00>s<00><00> <15> <15><14> rc <0A><00>R#)a<>
`True` if the `Application` can expect to receive a CPR response after
calling `ask_for_cpr` (this will come back through the corresponding
`Input`).
This is used to determine the amount of available rows we have below
the cursor position. In the first place, we have this so that the drop
down autocompletion menus are sized according to the available space.
On Windows, we don't need this, there we have
`get_rows_below_cursor_position`.
Frrs&r<00>responds_to_cpr<70>Output.responds_to_cpr<70>s<00><00>rc<01><00>V^8<>dQhRR/#<00>rrrr)rs"rrr<00>s<00><00>0<>0<>$<24>0rc <0A><00>R#)z%Return the size of the output window.Nrrs&r<00>get_size<7A>Output.get_size<7A>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00>s<00><00><16><16>d<EFBFBD>rc <0A><00>R#)z Sound bell.Nrrs&r<00>bell<6C> Output.bell<6C>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00>s<00><00><1A><1A><04>rc <0A><00>R#<00>zFor vt100 only.Nrrs&r<00>enable_bracketed_paste<74>Output.enable_bracketed_paste<74>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00><00><00><00><1A><1A><14>rc <0A><00>R#r<>rrs&r<00>disable_bracketed_paste<74>Output.disable_bracketed_paste<74>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00>s<00><00> <0C> <0C>t<EFBFBD> rc <0A><00>R#)z<>
For vt100 only.
Put the terminal in normal cursor mode (instead of application mode).
See: https://vt100.net/docs/vt100-ug/chapter3.html
Nrrs&r<00>reset_cursor_key_mode<64>Output.reset_cursor_key_mode<64>rrc<01><00>V^8<>dQhRR/#r:r)rs"rrr<00>r<>rc <0A><00>R#)zFor Win32 only.Nrrs&r<00>scroll_buffer_to_prompt<70>Output.scroll_buffer_to_prompt<70>rrc<01><00>V^8<>dQhRR/#rr)rs"rrr<00>s<00><00>"<22>"<22><03>"rc <0A><00>\h)zFor Windows only.<2E><01>NotImplementedErrorrs&r<00>get_rows_below_cursor_position<6F>%Output.get_rows_below_cursor_position<6F><00><00><00>!<21>!rc<01><00>V^8<>dQhRR/#<00>rrr
r)rs"rrr<00>s<00><00> <0C> <0C><1A> rc <0A><00>R#)a<>
Get default color depth for this output.
This value will be used if no color depth was explicitly passed to the
`Application`.
.. note::
If the `$PROMPT_TOOLKIT_COLOR_DEPTH` environment variable has been
set, then `outputs.defaults.create_output` will pass this value to
the implementation as the default_color_depth, which is returned
here. (This is not used when the output corresponds to a
prompt_toolkit SSH/Telnet session.)
Nrrs&r<00>get_default_color_depth<74>Output.get_default_color_depth<74>rrr<00><02>r<>)/<2F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r<00>__annotations__rrr$r,r0r7r<r@rDrHrLrPrTrXr\r`rhrlrprxrr<>r<>r<>r<>r<>r<>r<>r<><00>propertyr<79>r<>r<>r<>r<>r<>r<>r<>r<><00>__static_attributes__rrrr r s<><00><00><08>!<21>F<EFBFBD>M<EFBFBD> <20><13>K<01><14>K<01><14> <0C><14> <0C><14>J<01><14>J<01><14><16><14><16><14><1E><14><1E><14>:<3A><14>:<3A><14>,<2C><14>,<2C><14> <0C><14> <0C> <14>M<01><14>M<01><14>-<2D><14>-<2D><14><18><14><18><14><19><14><19><14> <0C><14> <0C>
<14> <0C><14> <0C> <14>.<2E><14>.<2E><14>0<><14>0<><14>&<26><14>&<26><14>%<25><14>%<25><14> <20><14> <20><14>)<29><14>)<29><14>+<2B><14>+<2B><14>.<2E><14>.<2E><14>/<2F><14>/<2F><14><17><14><17><14><17><14><17><14>8<><14>8<><14><1E><14><1E> <0C> <0E> <15><0E> <15><14>0<><14>0<><16><1A><1A> <0C><1A>"<22><14> <0C><14> r)<01> metaclassc<01><><00>]tRt^<5E>tRtRRltRRltRRltRR ltR
R lt R R lt
RRlt RRlt RRlt RRltRRltRRltRRltRRltRRltR R!ltR"R#ltR$R%ltRJR&R'lltR(R)ltR*R+ltR,R-ltR.R/ltR0R1ltR2R3ltR4R5ltR6R7ltR8R9lt R:R;lt!R<R=lt"R>R?lt#R@RAlt$RBRClt%RDRElt&RFRGlt'RHt(RI#)Kr z<
For testing. An output class that doesn't render anything.
c<01><00>V^8<>dQhRR/#rr)rs"rr<00>DummyOutput.__annotate__<5F>s<00><00>"<22>"<22><03>"rc <0A><00>\h)z*There is no sensible default for fileno().r<>rs&rr<00>DummyOutput.fileno<6E>r<>rc<01><00>V^8<>dQhRR/#r!r)rs"rrr<><00>s<00><00><17><17>#<23>rc <09><00>R#)zutf-8rrs&rr$<00>DummyOutput.encoding<6E>s<00><00>rc<01> <00>V^8<>dQhRRRR/#r'r)rs"rrr<><00>s<00><00> <0A> <0A>#<23> <0A>$<24> rc <09><00>R#<00>Nrr+s&&rr,<00>DummyOutput.write<74><00><00><00> rc<01> <00>V^8<>dQhRRRR/#r'r)rs"rrr<><00>s<00><00> <0A> <0A>c<EFBFBD> <0A>d<EFBFBD> rc <09><00>R#r<>rr+s&&rr0<00>DummyOutput.write_raw<61>r<>rc<01> <00>V^8<>dQhRRRR/#r3r)rs"rrr<><00>s<00><00> <0A> <0A>s<EFBFBD> <0A>t<EFBFBD> rc <09><00>R#r<>rr6s&&rr7<00>DummyOutput.set_title<6C>r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<><00><00><00><00> <0A> <0A>T<EFBFBD> rc <09><00>R#r<>rrs&rr<<00>DummyOutput.clear_title<6C>r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<><00>s<00><00> <0A> <0A>t<EFBFBD> rc <09><00>R#r<>rrs&rr@<00>DummyOutput.flush<73>r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<><00>s<00><00> <0A> <0A>d<EFBFBD> rc <09><00>R#r<>rrs&rrD<00>DummyOutput.erase_screen<65>r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<><00><00><00><00> <0A> <0A><04> rc <09><00>R#r<>rrs&rrH<00>"DummyOutput.enter_alternate_screen<65>r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<><00><00><00> <0A> <0A>t<EFBFBD> rc <09><00>R#r<>rrs&rrL<00>!DummyOutput.quit_alternate_screenr<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>s<00><00> <0A> <0A>d<EFBFBD> rc <09><00>R#r<>rrs&rrP<00> DummyOutput.enable_mouse_supportr<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>r<>rc <09><00>R#r<>rrs&rrT<00>!DummyOutput.disable_mouse_supportr<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<> s<00><00> <0A> <0A>4<EFBFBD> rc <09><00>R#r<>rrs&rrX<00>DummyOutput.erase_end_of_line r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<> s<00><00> <0A> <0A>D<EFBFBD> rc <09><00>R#r<>rrs&rr\<00>DummyOutput.erase_down r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<><00><00><00> <0A> <0A>$<24> rc <09><00>R#r<>rrs&rr`<00>DummyOutput.reset_attributesr<>rc<01>$<00>V^8<>dQhRRRRRR/#rcr)rs"rrr<>s!<00><00> <0A> <0A>E<EFBFBD> <0A>
<EFBFBD> <0A>t<EFBFBD> rc <09><00>R#r<>rrgs&&&rrh<00>DummyOutput.set_attributesr<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>rrc <09><00>R#r<>rrs&rrl<00>DummyOutput.disable_autowrapr<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>s<00><00> <0A> <0A><14> rc <09><00>R#r<>rrs&rrp<00>DummyOutput.enable_autowrapr<>rc<01>$<00>V^8<>dQhRRRRRR/#rsr)rs"rrr<>s!<00><00> <0A> <0A>s<EFBFBD> <0A><03> <0A>D<EFBFBD> rc <09><00>R#r<>rrws&&&rrx<00>DummyOutput.cursor_gotor<>rc<01> <00>V^8<>dQhRRRR/#r{r)rs"rrr<>s<00><00> <0A> <0A><03> <0A><04> rc <09><00>R#r<>rr~s&&rr<00>DummyOutput.cursor_upr<>rc<01> <00>V^8<>dQhRRRR/#r{r)rs"rrr<>!s<00><00> <0A> <0A>#<23> <0A>$<24> rc <09><00>R#r<>rr~s&&rr<><00>DummyOutput.cursor_down!r<>rc<01> <00>V^8<>dQhRRRR/#r{r)rs"rrr<>$s<00><00> <0A> <0A>S<EFBFBD> <0A>T<EFBFBD> rc <09><00>R#r<>rr~s&&rr<><00>DummyOutput.cursor_forward$r<>rc<01> <00>V^8<>dQhRRRR/#r{r)rs"rrr<>'s<00><00> <0A> <0A>c<EFBFBD> <0A>d<EFBFBD> rc <09><00>R#r<>rr~s&&rr<><00>DummyOutput.cursor_backward'r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>*r<>rc <09><00>R#r<>rrs&rr<><00>DummyOutput.hide_cursor*r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>-r<>rc <09><00>R#r<>rrs&rr<><00>DummyOutput.show_cursor-r<>rc<01> <00>V^8<>dQhRRRR/#r<>r)rs"rrr<>0s<00><00> <0A> <0A>[<5B> <0A>T<EFBFBD> rc <09><00>R#r<>rr<>s&&rr<><00>DummyOutput.set_cursor_shape0r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>3s<00><00> <0A> <0A>D<EFBFBD> rc <09><00>R#r<>rrs&rr<><00>DummyOutput.reset_cursor_shape3r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>6r<>rc <09><00>R#r<>rrs&rr<><00>DummyOutput.ask_for_cpr6r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>9s<00><00> <0A> <0A>d<EFBFBD> rc <09><00>R#r<>rrs&rr<><00>DummyOutput.bell9r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<><r<>rc <09><00>R#r<>rrs&rr<><00>"DummyOutput.enable_bracketed_paste<r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>?<00><00><00> <0A> <0A><14> rc <09><00>R#r<>rrs&rr<><00>#DummyOutput.disable_bracketed_paste?r<>rc<01><00>V^8<>dQhRR/#r:r)rs"rrr<>Br?rc <09><00>R#r<>rrs&rr<><00>#DummyOutput.scroll_buffer_to_promptBr<>rc<01><00>V^8<>dQhRR/#r<>r)rs"rrr<>Es<00><00>)<29>)<29>$<24>)rc <09><00>\^(^PR7#)<02>()<02>rows<77>columnsrrs&rr<><00>DummyOutput.get_sizeEs<00><00><13><12>R<EFBFBD>(<28>(rc<01><00>V^8<>
<00> DEPTH_1_BITrs&rr<><00>#DummyOutput.get_default_color_depthKs<00><00><19>%<25>%<25>%rrNr<4E>))r<>r<>r<>r<>r<>rr$r,r0r7r<r@rDrHrLrPrTrXr\r`rhrlrprxrr<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rrrr r <00>s<><00><00><08>"<22><17> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A> <0A>)<29><12>&<26>&rN)r<><00>
__future__r<00>abcrr<00>typingr<00>prompt_toolkit.cursor_shapesr<00>prompt_toolkit.data_structuresr<00>prompt_toolkit.stylesr rer
<00>__all__r r rrr<00><module>rYsM<00><01><04>#<23>'<27><19>4<>/<2F>'<27>#<23> <0A><11> <02><07> F <0C>w<EFBFBD>F <0C>Rm&<26>&<26>m&r