Files
ServerSync/lib/prompt_toolkit/application/__pycache__/application.cpython-314.pyc

590 lines
77 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i
<EFBFBD><00><01>~<00>^RIHt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI t ^RIH
t
H t H t H t HtHt^RIHtHt^RIHt^RIHt^RIHtHtHtHtHtHtHtHtH t H!t!H"t"^RI#H$t$^R I%H&t&^R
I'H(t(H)t)^R I*H+t+H,t,^R I-H.t.^R I/H0t0^RI1H2t2H3t3H4t4H5t5^RI6H7t7^RI8H9t9H:t:H;t;H<t<^RI=H>t>^RI?H@t@^RIAHBtBHCtC^RIDHEtE^RIFHGtG^RIHHItI^RIJHKtKHLtLHMtMHNtNHOtOHPtPHQtQ^RIRHStSHTtT^RIUHVtV^RIWHXtX^RIYHZtZH[t[^RI\H]t]H^t^^RI_H`t`^RIaHbtbHctc^RIdHeteHftf^R IgHhthHiti^R!IjHktk^R"IlHmtmHntnHotoHptpHqtqHrtrHstsHttt^R#IuHvtvHwtw^R$IxHytyHztz^R%I{H|t|H{t{R&.t}]St~] !R'4t]R(.R3,t<>]<5D>!]R)R4t<>]<5D>!]R*R4t<>!R+R&]],4t<>!R,R-]O4t<>R.R/lt<>]R0R1l4t<>]R2R3l4t<>R#)4<>)<01> annotationsN)<06>AbstractEventLoop<6F>Future<72>Task<73> ensure_future<72>get_running_loop<6F>sleep)<02> ExitStack<63>contextmanager)<01>Popen)<01> format_tb) <0B>Any<6E>Callable<6C> Coroutine<6E> Generator<6F>Generic<69>Hashable<6C>Iterable<6C>Iterator<6F>TypeVar<61>cast<73>overload)<01>Buffer)<01> SimpleCache)<02> Clipboard<72>InMemoryClipboard)<02>AnyCursorShapeConfig<69>to_cursor_shape_config)<01>Size)<01> EditingMode)<04> InputHook<6F>get_traceback_from_context<78>new_eventloop_with_inputhook<6F>run_in_executor_with_context)<01>call_soon_threadsafe)<04> Condition<6F>Filter<65> FilterOrBool<6F> to_filter)<01>AnyFormattedText)<01>Input)<02> get_typeahead<61>store_typeahead)<01>load_page_navigation_bindings)<01>load_key_bindings)<01>
EmacsState)<07>Binding<6E>ConditionalKeyBindings<67>GlobalOnlyKeyBindings<67> KeyBindings<67>KeyBindingsBase<73> KeysTuple<6C>merge_key_bindings)<02> KeyPressEvent<6E> KeyProcessor)<01>ViState)<01>Keys)<02> Container<65>Window)<02> BufferControl<6F> UIControl)<01>create_dummy_layout)<02>Layout<75>walk)<02>
ColorDepth<EFBFBD>Output)<02>Renderer<65>print_formatted_text)<01> SearchState)<08> BaseStyle<6C>
DummyStyle<EFBFBD>DummyStyleTransformation<6F> DynamicStyle<6C>StyleTransformation<6F>default_pygments_style<6C>default_ui_style<6C> merge_styles)<02>Event<6E>in_main_thread)<02>get_app_session<6F>set_app)<02> in_terminal<61>run_in_terminal<61> Application<6F>
_AppResult<EFBFBD>Application[_AppResult]<5D>SIGWINCH<43>SIGTSTPc<01><><00>]tRt^itRtRRRRRRRRRRR]P RRRRRRRRRRRRR3RRlltR R
lt] R R l4t
] R Rl4t ] RRl4t RRlt RRlt] RRl4tRPRRlltRRltRRltRRltRR ltRQR!R"lltRRR#R$lltRSR%R&lltR'R(lt]R)R*l4tR+R,ltR-R.ltR/R0ltR1R2ltR3R4ltR5R6lt ]!R7R8l4t"]!R9R:/R;R<ll4t"]!R9R:/R=R>ll4t"RTR?R@llt"RARBlt#RURCRDllt$RVRERFllt%RQRGRHllt&] RIRJl4t'] RKRLl4t(RMRNlt)ROt*R#)WrVa/
The main Application class!
This glues everything together.
:param layout: A :class:`~prompt_toolkit.layout.Layout` instance.
:param key_bindings:
:class:`~prompt_toolkit.key_binding.KeyBindingsBase` instance for
the key bindings.
:param clipboard: :class:`~prompt_toolkit.clipboard.Clipboard` to use.
:param full_screen: When True, run the application on the alternate screen buffer.
:param color_depth: Any :class:`~.ColorDepth` value, a callable that
returns a :class:`~.ColorDepth` or `None` for default.
:param erase_when_done: (bool) Clear the application output when it finishes.
:param reverse_vi_search_direction: Normally, in Vi mode, a '/' searches
forward and a '?' searches backward. In Readline mode, this is usually
reversed.
:param min_redraw_interval: Number of seconds to wait between redraws. Use
this for applications where `invalidate` is called a lot. This could cause
a lot of terminal output, which some terminals are not able to process.
`None` means that every `invalidate` will be scheduled right away
(which is usually fine).
When one `invalidate` is called, but a scheduled redraw of a previous
`invalidate` call has not been executed yet, nothing will happen in any
case.
:param max_render_postpone_time: When there is high CPU (a lot of other
scheduled calls), postpone the rendering max x seconds. '0' means:
don't postpone. '.5' means: try to draw at least twice a second.
:param refresh_interval: Automatically invalidate the UI every so many
seconds. When `None` (the default), only invalidate when `invalidate`
has been called.
:param terminal_size_polling_interval: Poll the terminal size every so many
seconds. Useful if the applications runs in a thread other then then
main thread where SIGWINCH can't be handled, or on Windows.
Filters:
:param mouse_support: (:class:`~prompt_toolkit.filters.Filter` or
boolean). When True, enable mouse support.
:param paste_mode: :class:`~prompt_toolkit.filters.Filter` or boolean.
:param editing_mode: :class:`~prompt_toolkit.enums.EditingMode`.
:param enable_page_navigation_bindings: When `True`, enable the page
navigation key bindings. These include both Emacs and Vi bindings like
page-up, page-down and so on to scroll through pages. Mostly useful for
creating an editor or other full screen applications. Probably, you
don't want this for the implementation of a REPL. By default, this is
enabled if `full_screen` is set.
Callbacks (all of these should accept an
:class:`~prompt_toolkit.application.Application` object as input.)
:param on_reset: Called during reset.
:param on_invalidate: Called when the UI has been invalidated.
:param before_render: Called right before rendering.
:param after_render: Called right after rendering.
I/O:
(Note that the preferred way to change the input/output is by creating an
`AppSession` with the required input/output objects. If you need multiple
applications running at the same time, you have to create a separate
`AppSession` using a `with create_app_session():` block.
:param input: :class:`~prompt_toolkit.input.Input` instance.
:param output: :class:`~prompt_toolkit.output.Output` instance. (Probably
Vt100_Output or Win32Output.)
Usage:
app = Application(...)
app.run()
# Or
await app.run_async()
NTFg{<14>G<EFBFBD>z<EFBFBD>?<3F><00>?c4<01><><00>V^8<>dQhRRRRRRRRR R
R R R RRRRRRRRRRRRRRRRRRRRRRRRR R!R"R#R"R$R"R%R"R&R'R(R)R*R+/#),<2C><00>layoutz Layout | None<6E>style<6C>BaseStyle | None<6E>include_default_pygments_styler(<00>style_transformationzStyleTransformation | None<6E> key_bindingszKeyBindingsBase | None<6E> clipboardzClipboard | None<6E> full_screen<65>bool<6F> color_depthz3ColorDepth | Callable[[], ColorDepth | None] | None<6E> mouse_support<72>enable_page_navigation_bindingszNone | FilterOrBool<6F>
paste_mode<EFBFBD> editing_moder <00>erase_when_done<6E>reverse_vi_search_direction<6F>min_redraw_intervalzfloat | int | None<6E>max_render_postpone_time<6D>refresh_intervalz float | None<6E>terminal_size_polling_interval<61>cursorr<00>on_resetz*ApplicationEventHandler[_AppResult] | None<6E> on_invalidate<74> before_render<65> after_render<65>inputz Input | None<6E>outputz Output | None<6E>return<72>None<6E>)<01>formats"<22>M/tmp/pip-target-wqrk2shd/lib/python/prompt_toolkit/application/application.py<70> __annotate__<5F>Application.__annotate__<5F>s.<00><00>W<15>W<15><1D>W<15> <20>W<15>)5<> W<15>
9<> W<15> -<2D> W<15>$<24>W<15><1A>W<15>J<01>W<15>$<24>W<15>*<19>W<15>!<21>W<15>"<22>W<15><1E>W<15> &2<>!W<15>"0<>#W<15>$#5<>%W<15>&'<27>'W<15>()5<>)W<15>*%<25>+W<15>,=<3D>-W<15>.B<01>/W<15>0B<01>1W<15>2A<01>3W<15>6<1C>7W<15>8<1E>9W<15>:
<0E>;W<15>c <09><a<00>V
f\V3Rl4p
\V 4p \V 4p \V4p\V
4p
\V4pVf \4pVf \4pVSnVSnVSn\4Sn\4Sn
VSn T;'g \4Sn VSnVSnV SnV SnV SnV SnVSnV
SnVSnVSnVSnVSn\5V4Sn\9SV4Sn\9SV4Sn\9SV4Sn\9SV4Sn \C4pT;'g VPDSn"T;'g VPFSn#.Sn$RSn%RSn&RSn'RSn(RSn)RSn*\W4Sn,\[4Sn.RSn/RSn0SPcV4Sn2\gSPdSPDVV SPhR7Sn5^Sn6RSn7.Sn8RSn9\u\wS44Sn<RSn=RSn>SP4R#)Nc<01><<01>SP#<00>N)rf<00><01>selfs<00>r~<00><lambda><3E>&Application.__init__.<locals>.<lambda><3E>s <00><><00><04>@P<>@Pr<50>Fr\g<00>?)rfri<00>cpr_not_supported_callbackg)@r&r)r@rJr`rcrdr/<00>_default_bindingsr.<00>_page_navigation_bindingsr_rrerf<00> _color_depthrirkrlrmrnrjrorprqrrrrsrPrurtrvrwrRryrx<00>pre_run_callables<65> _is_running<6E>future<72>loop<6F> _loop_thread<61>context<78> quoted_insertr:<00>vi_stater0<00> emacs_state<74> ttimeoutlen<65>
timeoutlen<EFBFBD>_create_merged_style<6C> _merged_stylerEr<><00>renderer<65>render_counter<65> _invalidated<65>_invalidate_events<74>_last_redraw_timer9<00>_CombinedRegistry<72> key_processor<6F>_running_in_terminal<61>_running_in_terminal_f<5F>reset)r<>r_r`rbrcrdrerfrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxry<00>sessionsf&&&&&&&&&&&&&&&&&&&&&&&&& r~<00>__init__<5F>Application.__init__<5F>s<><00><><00>@ +<2B> 2<>.7<EFBFBD>8P<EFBFBD>.Q<> +<2B><1E>z<EFBFBD>*<2A>
<EFBFBD>!<21>-<2D>0<> <0A>&/<2F>0K<30>&L<>#<23>*3<>4S<34>*T<>'<27>)2<>3Q<33>)R<>&<26> <11>><3E>(<28>*<2A>F<EFBFBD> <1F> '<27>#;<3B>#=<3D> <20><1A><04>
<EFBFBD>$8<><04>!<21>)<29><04><19>!2<>!4<><04><1E>)F<>)H<><04>&<26><1C><04> <0B>"<22>9<>9<>&7<>&9<><04><0E>!,<2C><04><18>'<27><04><19>*<2A><04><1A>$<24><04><0F>(<28><04><19>.<2E><04><1C>+F<><04>(<28>/N<><04>,<2C>#6<><04> <20>(@<40><04>%<25> 0<><04><1D>.L<><04>+<2B>,<2C>V<EFBFBD>4<><04> <0B>#<23>4<EFBFBD><1D>7<><04><1A><1D>d<EFBFBD>H<EFBFBD>-<2D><04> <0A>"<22>4<EFBFBD><1D>7<><04><1A>!<21>$<24> <0C>5<><04><19>"<22>#<23><07><1C>.<2E>.<2E><07><0E><0E><04> <0B><1A>+<2B>+<2B>g<EFBFBD>m<EFBFBD>m<EFBFBD><04>
<EFBFBD><><3E><04><1E> <20><04><18>15<31><04> <0B>.2<EFBFBD><04> <09>59<35><04><19>37<33><04> <0C>#<23><04><1A> <20> <09><04> <0A>%<25><<3C><04><18><1F><04><18><1E><04><0F>"<22>6<>6<>7U<37>V<><04><1A> <20> <10> <1E> <1E> <10>K<EFBFBD>K<EFBFBD>#<23>'<27>'+<2B>'F<>'F<> 
<EFBFBD><04> <0A> <20><04><1B>"<22><04><19> <0F> <0A><1F>"%<25><04><1E>*<2A>*;<3B>D<EFBFBD>*A<>B<><04><1A>%*<2A><04>!<21>;?<3F><04>#<23> <0A>
<EFBFBD>
<EFBFBD> r<>c<01> <00>V^8<>dQhRRRR/#)r^rbr'rzrHr|)r}s"r~rr<>Ss<00><00>
<EFBFBD>
<EFBFBD>6<EFBFBD>
<EFBFBD>i<EFBFBD>
r<EFBFBD>c <0A><>aaaa<04>\4o\4o\RVVV3Rll4p\\ 4V\V3Rl4.4#)zr
Create a `Style` object that merges the default UI style, the default
pygments style, and the custom user style.
c<01><00>V^8<>dQhRR/#)r^rzrHr|)r}s"r~r<00>6Application._create_merged_style.<locals>.__annotate__\s<00><00> #<23> #<23>I<EFBFBD> #r<>c<01>&<<03>S!4'dS#S#r<>r|)<03> dummy_stylerb<00>pygments_styles<00><><EFBFBD>r~<00>conditional_pygments_style<6C>DApplication._create_merged_style.<locals>.conditional_pygments_style[s<00><><00>-<2D>/<2F>/<2F>%<25>%<25>"<22>"r<>c<01><<01>SP#r<>)r`r<>s<00>r~r<><00>2Application._create_merged_style.<locals>.<lambda>fs <00><><00>T<EFBFBD>Z<EFBFBD>Zr<5A>)rIrMrKrOrN)r<>rbr<>r<>r<>sff @@r~r<><00> Application._create_merged_styleSsQ<00><><00>
!<21>l<EFBFBD> <0B>/<2F>1<><0E> <15> #<23> #<23>
<16> #<23> <1C> <20>"<22>*<2A><1C>/<2F>0<> <0E>
<EFBFBD>
r<EFBFBD>c<01><00>V^8<>dQhRR/#)r^rzrCr|)r}s"r~rr<>ks<00><00><15><15>Z<EFBFBD>r<>c <0A><><00>VPp\V4'dV!4pVfVPP4pV#)a<>
The active :class:`.ColorDepth`.
The current value is determined as follows:
- If a color depth was given explicitly to this application, use that
value.
- Otherwise, fall back to the color depth that is reported by the
:class:`.Output` implementation. If the :class:`.Output` class was
created using `output.defaults.create_output`, then this value is
coming from the $PROMPT_TOOLKIT_COLOR_DEPTH environment variable.
)r<><00>callablery<00>get_default_color_depth)r<><00>depths& r~rh<00>Application.color_depthjs;<00><00><15>!<21>!<21><05> <13>E<EFBFBD>?<3F>?<3F><19>G<EFBFBD>E<EFBFBD> <10>=<3D><18>K<EFBFBD>K<EFBFBD>7<>7<>9<>E<EFBFBD><14> r<>c<01><00>V^8<>dQhRR/#)r^rzrr|)r}s"r~rr<><00>s<00><00>

<EFBFBD>

<EFBFBD><06>

r<EFBFBD>c <0A>V<00>VPP;'g \RR7#)z<>
The currently focused :class:`~.Buffer`.
(This returns a dummy :class:`.Buffer` when none of the actual buffers
has the focus. In this case, it's really not practical to check for
`None` values or catch exceptions every time.)
z dummy-buffer)<01>name)r_<00>current_bufferrr<>s&r~r<><00>Application.current_buffer<65>s*<00><00><14>{<7B>{<7B>)<29>)<29>
<EFBFBD>
<EFBFBD>V<EFBFBD><1F>.
<EFBFBD>
r<EFBFBD>c<01><00>V^8<>dQhRR/#)r^rzrGr|)r}s"r~rr<><00>s<00><00> !<21> !<21>k<EFBFBD> !r<>c <0A><><00>VPPp\V\4'd VP#\ 4#)z^
Return the current :class:`.SearchState`. (The one for the focused
:class:`.BufferControl`.)
)r_<00>current_control<6F>
isinstancer><00> search_staterG)r<><00>
ui_controls& r~<00>current_search_state<74> Application.current_search_state<74>s4<00><00> <1A>[<5B>[<5B>0<>0<>
<EFBFBD> <15>j<EFBFBD>-<2D> 0<> 0<><1D>*<2A>*<2A> *<2A><1E>=<3D> r<>c<01><00>V^8<>dQhRR/#<00>r^rzr{r|)r}s"r~rr<><00>s<00><00><1A><1A>t<EFBFBD>r<>c <0A>F<00>RVn\4VnVPP 4VP
P 4VP P 4VPP 4VPP 4VPP4VP pVPP4'gCVP4F,pVPP4'gK%W!nR# R#R#)z/
Reset everything, for reading the next input.
<EFBFBD>N)<10>
exit_style<EFBFBD>set<65>_background_tasksr<73>r<>r<>r_r<>r<>rt<00>firer<65><00> is_focusable<6C>find_all_windows<77>content<6E>current_window)r<>r_<00>ws& r~r<><00>Application.reset<65>s<><00><00><1D><04><0F>25<32>%<25><04><1E> <0C> <0A> <0A><1B><1B><1D> <0C><1A><1A> <20> <20>"<22> <0C> <0B> <0B><19><19><1B> <0C> <0A> <0A><1B><1B><1D> <0C><18><18><1E><1E> <20> <0A> <0A> <0A><1A><1A><1C><16><1B><1B><06><15>%<25>%<25>2<>2<>4<>4<><1B>,<2C>,<2C>.<2E><01><14>9<EFBFBD>9<EFBFBD>)<29>)<29>+<2B>+<2B>,-<2D>)<29><19>/<2F>5r<35>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00>3<1E>3<1E>D<EFBFBD>3r<>c <0A>^aaaaa<04>SP'gR#SPe!SPP4'dR#SP'dR#RSnSPP SP
P 4RV3RlloRVV3RlloSP'dn\P!4SP,
oSSP8d.RVVV3RlloSPP VV3R l4R#S!4R#S!4R#)
zG
Thread safe way of sending a repaint trigger to the input event loop.
NTc<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>,Application.invalidate.<locals>.__annotate__<5F>s<00><00> <1B> <1B><04> r<>c<01>6<<01>RSnSP4R#)FN)r<><00>_redrawr<77>s<00>r~<00>redraw<61>&Application.invalidate.<locals>.redraw<61>s<00><><00> %<25>D<EFBFBD> <1D> <10>L<EFBFBD>L<EFBFBD>Nr<4E>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00> <0E> <0E><14> r<>c<01>L<<02>\SSPSPR7R#))<02>max_postpone_timer<65>N)r%rpr<>)r<>r<>s<00><>r~<00>schedule_redraw<61>/Application.invalidate.<locals>.schedule_redraw<61>s<00><><00> <20><16>$<24>*G<>*G<>d<EFBFBD>i<EFBFBD>i<EFBFBD> r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00>&<26>&<26><04>&r<>c<00><01><><"<00>\\\SP4S,
4GRjx<01>L
S!4R#L 5ir<>)r r<00>floatro)<03>diffr<66>r<>s<00><><EFBFBD>r~<00>redraw_in_future<72>0Application.invalidate.<locals>.redraw_in_future<72>s2<00><><00><00><1F><04>U<EFBFBD>D<EFBFBD>,D<>,D<> E<><04> L<>M<>M<>M<>#<23>%<25>N<01>s<00>.A<01>?<04>Ac<01>0<<02>SPS!44#r<>)<01>create_background_task)r<>r<>s<00><>r~r<><00>(Application.invalidate.<locals>.<lambda><3E>s<00><><00>D<EFBFBD>7<>7<>8H<38>8J<38>Kr<4B>)
r<EFBFBD>r<><00> is_closedr<64>r%rur<>ro<00>timer<65>)r<>r<>r<>r<>r<>sf@@@@r~<00>
invalidate<EFBFBD>Application.invalidate<74>s<><00><><00><14><1F><1F><1F> <13> <10>9<EFBFBD>9<EFBFBD> <1C><04> <09> <09> 3<> 3<> 5<> 5<> <12>
<10> <1C> <1C> <1C> <12> $<24>D<EFBFBD> <1D> <0A> <09> <09>&<26>&<26>t<EFBFBD>'9<>'9<>'><3E>'><3E>?<3F> <1B> <1B> <0E> <0E>
<10> #<23> #<23> #<23><18>9<EFBFBD>9<EFBFBD>;<3B><14>!7<>!7<>7<>D<EFBFBD><13>d<EFBFBD>.<2E>.<2E>.<2E>&<26>&<26><15> <09> <09>.<2E>.<2E>K<><12> <20>!<21> <1B> r<>c<01><00>V^8<>dQhRR/#<00>r^rzrgr|)r}s"r~rr<><00>s<00><00>!<21>!<21>T<EFBFBD>!r<>c <0A><00>VP#)z0True when a redraw operation has been scheduled.)r<>r<>s&r~<00> invalidated<65>Application.invalidated<65>s<00><00><14> <20> <20> r<>c<01> <00>V^8<>dQhRRRR/#)r^<00>render_as_donergrzr{r|)r}s"r~rr<><00>s<00><00>*4<>*4<>d<EFBFBD>*4<>t<EFBFBD>*4r<34>c <0A><>aa<01>RVV3RllpSPe,SPP4PV4R#R#)z<>
Render the command line again. (Not thread safe!) (From other threads,
or if unsure, use :meth:`.Application.invalidate`.)
:param render_as_done: make sure to put the cursor after the UI.
c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>)Application._redraw.<locals>.__annotate__<5F>s<00><00> 1<> 1<><04> 1r<31>c<01><><<02>SP'Ed?SP'Eg*SP'd\P!4SnS;P
^, unSP P4S'dWSP'dSPP4MOSPPSSPSR7M&SPPSSP4SPP4SPP4SP4R#R#R#)<03>)<01>is_doneN)r<>r<>ror<>r<>r<>rvr<>rmr<><00>erase<73>renderr_<00>update_parents_relationsrw<00>_update_invalidate_events)r<>r<>s<00><>r~<00>run_in_context<78>+Application._redraw.<locals>.run_in_context<78>s<><00><><00><13><1F><1F><1F><04>(A<>(A<>(A<><17>+<2B>+<2B>+<2B>-1<>Y<EFBFBD>Y<EFBFBD>[<5B>D<EFBFBD>*<2A><15>#<23>#<23>q<EFBFBD>(<28>#<23><14>"<22>"<22>'<27>'<27>)<29>!<21><1B>+<2B>+<2B>+<2B><1C> <0A> <0A>+<2B>+<2B>-<2D><1D> <0A> <0A>,<2C>,<2C>T<EFBFBD>4<EFBFBD>;<3B>;<3B><0E>,<2C>W<><18>M<EFBFBD>M<EFBFBD>(<28>(<28><14>t<EFBFBD>{<7B>{<7B>;<3B><14> <0B> <0B>4<>4<>6<><15>!<21>!<21>&<26>&<26>(<28><14>.<2E>.<2E>0<>-)B<01>r<>N)r<><00>copy<70>run)r<>r<>r<>sff r~r<><00>Application._redraw<61>s:<00><><00> 1<> 1<>B <10><<3C><<3C> #<23> <10>L<EFBFBD>L<EFBFBD> <1D> <1D> <1F> #<23> #<23>N<EFBFBD> 3<> $r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<>!s<00><00> M<01> M<01>$<24> Mr<>c <0A><>a<00>SPe@SP^8wd-RV3RllpSPV!SP44R#R#R#)zQ
Start a while/true loop in the background for automatic invalidation of
the UI.
Nc<01> <00>V^8<>dQhRRRR/#)r^rqr<>rzr{r|)r}s"r~r<00>:Application._start_auto_refresh_task.<locals>.__annotate__(s<00><00> &<26> &<26>U<EFBFBD> &<26>t<EFBFBD> &r<>c<00><01>\<"<00>\V4GRjx<01>L
SP4K&L5i)TN)r r<>)rqr<>s&<26>r~<00> auto_refresh<73>:Application._start_auto_refresh_task.<locals>.auto_refresh(s'<00><><00><00><1A><1F> 0<>1<>1<>1<><18>O<EFBFBD>O<EFBFBD>%<25>2<>s <00>,<01>*<04>,)rqr<>)r<>r sf r~<00>_start_auto_refresh_task<73>$Application._start_auto_refresh_task!sL<00><><00>
<10> <20> <20> ,<2C><14>1F<31>1F<31>!<21>1K<31> &<26> &<26>
<11> '<27> '<27> <0C>T<EFBFBD>5J<35>5J<35>(K<> L<>2L<01> ,r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<>/s<00><00>+<2B>+<2B>4<EFBFBD>+r<>c <0A><>a<00>SPFpVSP,pK RV3Rllp\V!44SnSPFpVSP, pK R#)zO
Make sure to attach 'invalidate' handlers to all invalidate events in
the UI.
c<01><00>V^8<>dQhRR/#)r^rzzIterable[Event[object]]r|)r}s"r~r<00>;Application._update_invalidate_events.<locals>.__annotate__;s<00><00> 5<> 5<>6<> 5r<35>c3<01><><"<00>SPP4FpVP4Rjx<01>L
K R#L
5ir<>)r_<00>find_all_controls<6C>get_invalidate_events)<02>cr<63>s <20>r~<00> gather_events<74><Application._update_invalidate_events.<locals>.gather_events;s2<00><><00><00><19>[<5B>[<5B>2<>2<>4<><01><1C>2<>2<>4<>4<>4<>5<>4<>s<00>1A<01>?<06> AN)r<><00>_invalidate_handler<65>list)r<><00>evrsf r~r<><00>%Application._update_invalidate_events/s`<00><><00><17>)<29>)<29>B<EFBFBD> <0E>$<24>*<2A>*<2A> *<2A>B<EFBFBD>*<2A>
 5<> 5<>#'<27>}<7D><EFBFBD>"7<><04><1F><16>)<29>)<29>B<EFBFBD> <0E>$<24>*<2A>*<2A> *<2A>B<EFBFBD>*r<>c<01> <00>V^8<>dQhRRRR/#)r^<00>sender<65>objectrzr{r|)r}s"r~rr<>Ds<00><00><1A><1A>&<26><1A>T<EFBFBD>r<>c <0A>&<00>VP4R#)z<>
Handler for invalidate events coming from UIControls.
(This handles the difference in signature between event handler and
`self.invalidate`. It also needs to be a method -not a nested
function-, so that we can remove it again .)
N)r<>)r<>rs&&r~r<00>Application._invalidate_handlerDs<00><00> <0A><0F><0F>r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<>Ns<00><00>
<17>
<17>D<EFBFBD>
r<>c <0A>~<00>VPPRR7VP4VP4R#)z<>
When the window size changes, we erase the current output and request
again the cursor position. When the CPR answer arrives, the output is
drawn again.
F)<01>leave_alternate_screenN)r<>r<><00>!_request_absolute_cursor_positionr<6E>r<>s&r~<00>
_on_resize<EFBFBD>Application._on_resizeNs.<00><00> <0A> <0A> <0A><1B><1B>5<EFBFBD><1B>9<> <0C>.<2E>.<2E>0<> <0C> <0C> <0C>r<>c<01> <00>V^8<>dQhRRRR/#)r^<00>pre_run<75>Callable[[], None] | Nonerzr{r|)r}s"r~rr<>Zs<00><00>&<26>&<26> 9<>&<26>T<EFBFBD>&r<>c <0A>r<00>V'dV!4VPF
pV!4K VPRR#)aI
Called during `run`.
`self.future` should be set to the new future at the point where this
is called in order to avoid data races. `pre_run` can be used to set a
`threading.Event` to synchronize with UI termination code, running in
another thread that would call `Application.exit`. (See the progress
bar code for an example.)
:NNNN)r<>)r<>r'rs&& r~<00>_pre_run<75>Application._pre_runZs1<00><00> <13> <13>I<EFBFBD><16>'<27>'<27>A<EFBFBD> <0A>C<EFBFBD>(<28> <10> "<22> "<22>1<EFBFBD> %r<>c
<01>,<00>V^8<>dQhRRRRRRRRRR /#)
r^r'r(<00>set_exception_handlerrg<00> handle_sigint<6E>slow_callback_durationr<6E>rzrWr|)r}s"r~rr<>lsC<00><00>V$<24>V$<24>*<2A>V$<24> $<24>V$<24><1C> V$<24>
!&<26> V$<24>
<14> V$r<>c<00> <0A>aaaaa"<00>SP'dQR4h\4'd\PR8XdRoRVV3Rllp\RV3Rll4p\RV3R ll4p\R
VV3R ll4p\R VV3R ll4p \RV3Rll4p
\RV3Rll4p \ 4;_uu_4p V P V!44RSnV P V!44p V P V!V 44V P V !V 44V P V
!V 44V P \S44V P SP44V P V !V 44pV!V4GRjx<01>L
SP4GRjx<01>L
uuRRR4#L&L SP4GRjx<01>L
i;i +'giM;iQR4h5i)a<>
Run the prompt_toolkit :class:`~prompt_toolkit.application.Application`
until :meth:`~prompt_toolkit.application.Application.exit` has been
called. Return the value that was passed to
:meth:`~prompt_toolkit.application.Application.exit`.
This is the main entry point for a prompt_toolkit
:class:`~prompt_toolkit.application.Application` and usually the only
place where the event loop is actually running.
:param pre_run: Optional callable, which is called right after the
"reset" of the application.
:param set_exception_handler: When set, in case of an exception, go out
of the alternate screen and hide the application, display the
exception, and wait for the user to press ENTER.
:param handle_sigint: Handle SIGINT signal if possible. This will call
the `<sigint>` key binding when a SIGINT is received. (This only
works in the main thread.)
:param slow_callback_duration: Display warnings if code scheduled in
the asyncio event loop takes more time than this. The asyncio
default of `0.1` is sometimes not sufficient on a slow system,
because exceptionally, the drawing of the app, which happens in the
event loop, can take a bit longer from time to time.
zApplication is already running.<2E>win32Fc<01> <00>V^8<>dQhRRRR/#)r^<00>fzasyncio.Future[_AppResult]rzrWr|)r}s"r~r<00>+Application.run_async.<locals>.__annotate__<5F>s<00><00>} <1E>} <1E> :<3A>} <1E>z<EFBFBD>} r<>c<00><01> <aaaaaa "<00>\P!4oSS nRoS P4S P S
4S P
P \S P44S P
P4RVVVV 3Rllo RVV 3RllpRVV 3RlloRVV 3RlloS PP4;_uu_4S PPV4;_uu_4\S P4;_uu_4S P4S P4S P!4S P#S P%44SGRjx<01>L
pS PR R
7S P&P4R S nS P*FpVS P,,pK .S nS P.P0'd#S P&P34GRjx<01>L
S P4pV'd VGRjx<01>L
\7S PS P
P944TuuRRR4uuRRR4uuRRR4#ELLsLW S P&P4R S nS P*FpTS P,,pK .S nS P.P0'd$S P&P34GRjx<01>L
S P4pT'd TGRjx<01>L
\7S PS P
P944i;i S PR R
7S P&P4R S nS P*FpTS P,,pK .S nS P.P0'd$S P&P34GRjx<01>L
S P4pT'd TGRjx<01>L
\7S PS P
P944i S P&P4R S nS P*FpTS P,,pK .S nS P.P0'd$S P&P34GRjx<01>L
S P4pT'd TGRjx<01>L
\7S PS P
P944i;i;i +'giM;iRRR4M +'giM;iRRR4R# +'giR#;i5i) Nc<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>?Application.run_async.<locals>._run_async.<locals>.__annotate__<5F>s<00><00> Q<01> Q<01>T<EFBFBD> Qr<>c<01><><<04>SP'gSPP'gR#SPP 4pSP
P V4SP
P4SPP'd0SP4'gSP\4R#R#S'dSP4SPS!44oR#r<>)r<>r<><00>waiting_for_cprrx<00> read_keysr<73><00> feed_multiple<6C> process_keys<79>closed<65>done<6E> set_exception<6F>EOFError<6F>cancelr<6C>)<05>keys<79>auto_flush_inputr3<00>
flush_taskr<EFBFBD>s <20><><EFBFBD><EFBFBD>r~<00>read_from_input<75>BApplication.run_async.<locals>._run_async.<locals>.read_from_input<75>s<><00><><00><1C>'<27>'<27>'<27><04> <0A> <0A>0M<30>0M<30>0M<30><1A><1C>z<EFBFBD>z<EFBFBD>+<2B>+<2B>-<2D><04><15>"<22>"<22>0<>0<><14>6<><14>"<22>"<22>/<2F>/<2F>1<><18>:<3A>:<3A>$<24>$<24>$<24><1C>6<EFBFBD>6<EFBFBD>8<EFBFBD>8<EFBFBD><19><0F><0F><08>1<>$<24>"<22>"<22>)<29>)<29>+<2B>!%<25>!<<3C>!<<3C>=M<>=O<>!P<>Jr<4A>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr7<00>s<00><00> 4<> 4<><04> 4r<34>c<01>F<<02>SP4PS4R#r<>)rr)r<>rEs<00><>r~<00>read_from_input_in_context<78>MApplication.run_async.<locals>._run_async.<locals>.read_from_input_in_context<78>s<00><><00><18> <0C> <0C><0E>"<22>"<22>?<3F>3r<33>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr7<00>s<00><00> <1E> <1E>D<EFBFBD> r<>c<00><01>\<"<00>\SP4GRjx<01>L
S!4R#L 5ir<>)r r<>)<02> flush_inputr<74>s<00><>r~rC<00>CApplication.run_async.<locals>._run_async.<locals>.auto_flush_input<75>s&<00><><00><00><1C>D<EFBFBD>,<2C>,<2C>-<2D>-<2D>-<2D><1B> <0A>.<2E>s <00>,<01>*<04>,c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr7<00>s<00><00> 2<> 2<><14> 2r<32>c<01>4<<02>SP'g<>SPP4pSPP V4SPP 4SPP 'dSP\4R#R#R#r<>) r<>rx<00>
flush_keysr<EFBFBD>r;r<r=r?r@)rBr3r<>s <20><>r~rM<00>>Application.run_async.<locals>._run_async.<locals>.flush_input<75>sj<00><><00><1B>|<7C>|<7C>|<7C><1F>:<3A>:<3A>0<>0<>2<>D<EFBFBD><18>&<26>&<26>4<>4<>T<EFBFBD>:<3A><18>&<26>&<26>3<>3<>5<><1B>z<EFBFBD>z<EFBFBD>(<28>(<28>(<28><19><0F><0F><08>1<>)<29> $r<>T)r<>F)<1D> contextvars<72> copy_contextr<74>r<>r*r<>r;r,rxr<<00>raw_mode<64>attach<63>attach_winch_signal_handlerr$r#r<>r r<><00>_poll_output_sizer<65>r<>r<>rry<00>responds_to_cpr<70>wait_for_cpr_responsesr<73>r-<00> empty_queue) r3rI<00>resultr<00>previous_run_in_terminal_frCr<>rMrDrEr'r<>s f @@@@@<40><>r~<00>
_run_async<EFBFBD>)Application.run_async.<locals>._run_async<6E>s9<00><><00><00>!<21>.<2E>.<2E>0<>G<EFBFBD>"<22>D<EFBFBD>L<EFBFBD> 59<35>J<EFBFBD> <11>J<EFBFBD>J<EFBFBD>L<EFBFBD> <10>M<EFBFBD>M<EFBFBD>'<27> "<22> <11> <1E> <1E> ,<2C> ,<2C>]<5D>4<EFBFBD>:<3A>:<3A>-F<> G<> <10> <1E> <1E> +<2B> +<2B> -<2D> Q<01> Q<01>6 4<> 4<> <1E> <1E> 2<> 2<><16><1A><1A>$<24>$<24>&<26>&<26><04>
<EFBFBD>
<EFBFBD>(9<>(9<>*<2A>)<0E>)<0E>*<2A>4<EFBFBD>?<3F>?<3F>;<3B>;<3B><14>6<>6<>8<><14> <0C> <0C><0E><14>-<2D>-<2D>/<2F><14>+<2B>+<2B>D<EFBFBD>,B<>,B<>,D<>E<>&V<01>#$<24>W<EFBFBD>F<EFBFBD>!V<01><1C> <0C> <0C>D<EFBFBD> <0C>9<>
<1D> <0A> <0A>+<2B>+<2B>-<2D>
,1<><04>(<28>#'<27>"9<>"9<>B<EFBFBD><1E>$<24>":<3A>":<3A>:<3A>B<EFBFBD>#:<3A>24<32><04>/<2F> <20>;<3B>;<3B>6<>6<>6<>"&<26>-<2D>-<2D>"F<>"F<>"H<>H<>H<>6:<3A>5P<35>5P<35>2<>5<>"<<3C><<3C><<3C>(<28><04>
<EFBFBD>
<EFBFBD>D<EFBFBD>4F<EFBFBD>4F<EFBFBD>4R<EFBFBD>4R<EFBFBD>4T<EFBFBD>U<><1D>c<<3C>;<3B>)<0E>)<0E>&<26>&<26>%<25>8I<01> =<3D><>1<1D> <0A> <0A>+<2B>+<2B>-<2D>
,1<><04>(<28>#'<27>"9<>"9<>B<EFBFBD><1E>$<24>":<3A>":<3A>:<3A>B<EFBFBD>#:<3A>24<32><04>/<2F> <20>;<3B>;<3B>6<>6<>6<>"&<26>-<2D>-<2D>"F<>"F<>"H<>H<>H<>6:<3A>5P<35>5P<35>2<>5<>"<<3C><<3C><<3C>(<28><04>
<EFBFBD>
<EFBFBD>D<EFBFBD>4F<EFBFBD>4F<EFBFBD>4R<EFBFBD>4R<EFBFBD>4T<EFBFBD>U<><55>C!V<01><1C> <0C> <0C>D<EFBFBD> <0C>9<>
<1D> <0A> <0A>+<2B>+<2B>-<2D>
,1<><04>(<28>#'<27>"9<>"9<>B<EFBFBD><1E>$<24>":<3A>":<3A>:<3A>B<EFBFBD>#:<3A>24<32><04>/<2F> <20>;<3B>;<3B>6<>6<>6<>"&<26>-<2D>-<2D>"F<>"F<>"H<>H<>H<>6:<3A>5P<35>5P<35>2<>5<>"<<3C><<3C><<3C>(<28><04>
<EFBFBD>
<EFBFBD>D<EFBFBD>4F<EFBFBD>4F<EFBFBD>4R<EFBFBD>4R<EFBFBD>4T<EFBFBD>U<><55>7<1D> <0A> <0A>+<2B>+<2B>-<2D>
,1<><04>(<28>#'<27>"9<>"9<>B<EFBFBD><1E>$<24>":<3A>":<3A>:<3A>B<EFBFBD>#:<3A>24<32><04>/<2F> <20>;<3B>;<3B>6<>6<>6<>"&<26>-<2D>-<2D>"F<>"F<>"H<>H<>H<>6:<3A>5P<35>5P<35>2<>5<>"<<3C><<3C><<3C>(<28><04>
<EFBFBD>
<EFBFBD>D<EFBFBD>4F<EFBFBD>4F<EFBFBD>4R<EFBFBD>4R<EFBFBD>4T<EFBFBD>U<><55>_<<3C>;<3B><>;<3B>)<0E>)<0E>)<0E>)<0E><>&<26>&<26>&<26>&<26>sO<00>CV
<01>$U6<05>U <09>AT< <0A>0M+ <0C>5J<10>6M+ <0C>;J <0C> A)T< <0A>7T< <0A>J<10>T< <0A>-T< <0A>2J
<10>33T< <0A>&
U <09>0
U6<05>: V
<01>M+ <0C>T< <0A>
T< <0A> A*M(<0F>7M(<0F>L<14>M(<0F>.M(<0F>3L6<14>44M(<0F>(T< <0A>+T9<0F>-Q<10>?A)T9<0F>)T9<0F>P <14>T9<0F> T9<0F>%P(<14>&4T9<0F>A*T6<13>T6<13>"S%<18>#T6<13><T6<13>T<18>4T6<13>6T9<0F>9T< <0A>< U <11>U <09> U6<05> U) <0A>$U6<05>,
V
<01>6 V <09> V
c<01><00>V^8<>dQhRR/#)r^rzzIterator[AbstractEventLoop]r|)r}s"r~rr4s<00><00> )<29> )<29>5<> )r<>c3<01><><"<00>\4pVSn\P!4SnVx<00>RSnRSnR# RSnRSni;i5ir<>)rr<><00> threading<6E>current_threadr<64>)r<>r<>s <20>r~<00>set_loop<6F>'Application.run_async.<locals>.set_loopsQ<00><><00><00>#<23>%<25>D<EFBFBD><1C>D<EFBFBD>I<EFBFBD> )<29> 8<> 8<> :<3A>D<EFBFBD> <1D> )<29><1A>
<EFBFBD> <20><04> <09>$(<28><04>!<21><>!<21><04> <09>$(<28><04>!<21>s<00>,A<01>A<00>A<01>A<03>Ac<01><00>V^8<>dQhRR/#)r^rz<00>Iterator[None]r|)r}s"r~rr4 s<00><00> )<29> )<29><0E> )r<>c3<01>N<"<00>RSnRx<00>RSnR# RSni;i5i)TNF<4E>r<>r<>s<00>r~<00>set_is_running<6E>-Application.run_async.<locals>.set_is_runnings&<00><><00><00>#<23>D<EFBFBD> <1C> )<29><15>#(<28><04> <20><>5<EFBFBD><04> <20>s<00>%<01><00> %<01> "<03>%c<01> <00>V^8<>dQhRRRR/#<00>r^r<>rrzrgr|)r}s"r~rr4(s<00><00> <16> <16>$5<> <16>.<2E> r<>c3<01>h<a"<00>S'dh\4;_uu_4SP\PVV3Rl4Rx<00>SP \P4RRR4R#Rx<00>R# SP \P4i;i +'giR#;i5i)c<01>N<<02>SPSPP4#r<>)r%r<><00> send_sigint)<03>_r<5F>r<>s*<2A><>r~r<><00>BApplication.run_async.<locals>.set_handle_sigint.<locals>.<lambda>/s<00><><00>4<EFBFBD>#<<3C>#<<3C> <20>.<2E>.<2E>:<3A>:<3A>$r<>N)<05>_restore_sigint_from_ctypes<65>add_signal_handler<65>signal<61>SIGINT<4E>remove_signal_handler)r<>r.r<>sf<><66>r~<00>set_handle_sigint<6E>0Application.run_async.<locals>.set_handle_sigint'sw<00><><00><00><1C>0<>2<>2<><19>+<2B>+<2B><1E> <0A> <0A><1A><16> B<01><1D><1C>2<>2<>6<EFBFBD>=<3D>=<3D>A<>3<>2<><16><><1D>2<>2<>6<EFBFBD>=<3D>=<3D>A<><41>3<>2<>2<>s4<00>B2<01>&B<05>A:<04>
B<05>*B2<01>:!B<07>B<05> B/ <09>) B2c<01> <00>V^8<>dQhRRRR/#rmr|)r}s"r~rr4;s<00><00>
<16>
<16>,=<3D>
<16>.<2E>
r<>c3<01><><"<00>S'dDVP4pVPSP4Rx<00>VPV4R#Rx<00>R# TPT4i;i5ir<>)<03>get_exception_handlerr-<00>_handle_exception)r<><00>previous_exc_handlerr<72>r-s& <20><>r~<00>set_exception_handler_ctx<74>8Application.run_async.<locals>.set_exception_handler_ctx:s[<00><><00><00>$<24>'+<2B>'A<>'A<>'C<>$<24><14>*<2A>*<2A>4<EFBFBD>+A<>+A<>B<>E<01><19><18>.<2E>.<2E>/C<>D<><16><><19>.<2E>.<2E>/C<>D<>s<00>4A+<01>A<00>A+<01>A(<03>(A+c<01> <00>V^8<>dQhRRRR/#rmr|)r}s"r~rr4Hs<00><00> N<01> N<01>(9<> N<01>n<EFBFBD> Nr<>c3<01>b<"<00>VPpSVnRx<00>WnR# Yni;i5ir<>)r/)r<><00>original_slow_callback_durationr/s& <20>r~<00>set_callback_duration<6F>4Application.run_async.<locals>.set_callback_durationGs5<00><><00><00>/3<>.I<>.I<> +<2B>*@<40>D<EFBFBD> '<27> N<01><15>/N<01>+<2B><>.M<>+<2B>s<00>/<01>$<00>/<01>,<03>/c<01> <00>V^8<>dQhRRRR/#)r^r<>rrzz$Iterator[asyncio.Future[_AppResult]]r|)r}s"r~rr4Ss<00><00> #<23> #<23>#<23> #<23> 1<> #r<>c3<01>n<"<00>VP4pVSnVx<00>RSnR# RSni;i5ir<>)<02> create_futurer<65>)r<>r3r<>s& <20>r~r<><00>,Application.run_async.<locals>.create_futureRs7<00><><00><00><15>"<22>"<22>$<24>A<EFBFBD><1B>D<EFBFBD>K<EFBFBD> #<23><17><07>
#<23><04> <0B><>d<EFBFBD><04> <0B>s<00>5<01>)<00> 5<01> 2<03>5N<> unreachable) r<>rQ<00>sys<79>platformr r
<00> enter_contextr<74>rS<00>_enable_breakpointhook<6F>$cancel_and_wait_for_background_tasks)r<>r'r-r.r/r^rdrjrxrr<>r<><00>stackr<6B>r3sfffff r~<00> run_async<6E>Application.run_asyncls<><00><><00><00>><18>#<23>#<23>#<23>F<>%F<>F<>#<23><1D><1F><1F>3<EFBFBD><<3C><<3C>7<EFBFBD>#:<3A>
"<22>M<EFBFBD>} <1E>} <1E>~
<18> )<29>
<18> )<29>
<18> )<29>
<18> )<29>
<18> <16> <16>
<18> <16>$
<18>
<16>
<16>
<18>
<16>
<18> N<01>
<18> N<01>
<18> #<23>
<18> #<23><17>[<5B>[<5B>E<EFBFBD> <11> <1F> <1F><0E> 0<> 1<>!&<26>D<EFBFBD> <1D><18>&<26>&<26>x<EFBFBD>z<EFBFBD>2<>D<EFBFBD> <11> <1F> <1F> 1<>$<24> 7<> 8<> <11> <1F> <1F> 9<>$<24> ?<3F> @<40> <11> <1F> <1F> 5<>d<EFBFBD> ;<3B> <<3C> <11> <1F> <1F><07><04> <0A> .<2E> <11> <1F> <1F><04> ;<3B> ;<3B> =<3D> ><3E><15>#<23>#<23>M<EFBFBD>$<24>$7<>8<>A<EFBFBD> B<01>'<27><01>]<5D>*<2A> <1B>?<3F>?<3F>A<>A<>A<>7<19>[<5B>*+<2B> B<01><>d<EFBFBD>?<3F>?<3F>A<>A<>A<><41>7<19>[<5B><>B $<24>m<EFBFBD>#<23>u<EFBFBD>sg<00>C H
<01>C G0<05> G<04>'G<08>(G<04>+G0<05>>G
<EFBFBD>?G0<05> H
<01>G<04>G0<05>G-<07>&G) <0C>'G-<07>-G0<05>0 H <09>;H
c <01>0<00>V^8<>dQhRRRRRRRRRRR R
/#) r^r'r(r-rgr.<00> in_thread<61> inputhookzInputHook | NonerzrWr|)r}s"r~rr<><00>sN<00><00>f%<25>f%<25>*<2A>f%<25> $<24>f%<25><1C> f%<25>
<18> f%<25> $<24> f%<25>
<14>f%r<>c <0A>taaaaa a <0C>V'dPRo RV VVV VV3Rllp\P!VR7pVP4VP4S eS hS #SP SSVR7pRRlp SeN\ S4p
V
P V4o V
P V
P44V
P4S #V !4'd(\P!4p
V
P V4#\P!V4# \d\P!T4u#i;i)a<>
A blocking 'run' call that waits until the UI is finished.
This will run the application in a fresh asyncio event loop.
:param pre_run: Optional callable, which is called right after the
"reset" of the application.
:param set_exception_handler: When set, in case of an exception, go out
of the alternate screen and hide the application, display the
exception, and wait for the user to press ENTER.
:param in_thread: When true, run the application in a background
thread, and block the current thread until the application
terminates. This is useful if we need to be sure the application
won't use the current event loop (asyncio does not support nested
event loops). A new event loop will be created in this background
thread, and that loop will also be closed when the background
thread terminates. When this is used, it's especially important to
make sure that all asyncio background tasks are managed through
`get_appp().create_background_task()`, so that unfinished tasks are
properly cancelled before the event loop is closed. This is used
for instance in ptpython.
:param handle_sigint: Handle SIGINT signal. Call the key binding for
`Keys.SIGINT`. (This only works in the main thread.)
Nc<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>%Application.run.<locals>.__annotate__<5F>s<00><00> "<22> "<22>4<EFBFBD> "r<>c<01>j<<06>SPSSRSR7oR# \dpToRp?R#Rp?ii;i)F)r'r-r.r<>N)r<00> BaseException)<07>e<> exceptionr<6E>r'r\r<>r-s <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>r~<00> run_in_thread<61>&Application.run.<locals>.run_in_thread<61>s><00><><00> "<22>!<21>X<EFBFBD>X<EFBFBD> '<27>.C<>&+<2B>"+<2B> &<26><16>F<EFBFBD><46>%<25>"<22> !<21>I<EFBFBD><49>"<22>s<00><00> 2<03>-<03>2)<01>target)r'r-r.c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00> <1D> <1D>d<EFBFBD> r<>c<01><><00>\PR,PR8;'d.R\P!^4PP
9# \ dR#i;i)<04>IPythonz$IPython/terminal/interactiveshell.pyF)<04><00>rr<>)r<><00>modules<65> version_info<66> _getframe<6D>f_code<64> co_filenamer<65>r|r<>r~<00>_called_from_ipython<6F>-Application.run.<locals>._called_from_ipython<6F>sa<00><00> <1D><17>K<EFBFBD>K<EFBFBD> <09>*<2A>7<>7<>.<2E>H<>;<3B>;<3B>><3E><1A>}<7D>}<7D>Q<EFBFBD>'<27>.<2E>.<2E>:<3A>:<3A>;<3B><12><>
!<21> <1D><1C> <1D>s<00>AA<00> A*<03>)A*) rb<00>Thread<61>start<72>joinr<6E>r#<00>run_until_complete<74>shutdown_asyncgens<6E>close<73>asyncio<69>get_event_loop<6F> RuntimeErrorr) r<>r'r-r.r<>r<>r<><00>thread<61>coror<6F>r<>r<>r\s fff&&f @@r~r<00>Application.run<75>s<00><><00>@ <15>.2<EFBFBD>I<EFBFBD> "<22> "<22><1F>%<25>%<25>]<5D>;<3B>F<EFBFBD> <12>L<EFBFBD>L<EFBFBD>N<EFBFBD> <12>K<EFBFBD>K<EFBFBD>M<EFBFBD><18>$<24><1F><0F><19>M<EFBFBD><13>~<7E>~<7E><1B>"7<>'<27><1E>
<EFBFBD><04>  <1D> <15> <20>0<> <09>:<3A>D<EFBFBD><19>,<2C>,<2C>T<EFBFBD>2<>F<EFBFBD> <10> #<23> #<23>D<EFBFBD>$;<3B>$;<3B>$=<3D> ><3E> <10>J<EFBFBD>J<EFBFBD>L<EFBFBD><19>M<EFBFBD> !<21> #<23> #<23>
5<><1F>-<2D>-<2D>/<2F><04> <1C>.<2E>.<2E>t<EFBFBD>4<>4<><1B>;<3B>;<3B>t<EFBFBD>$<24> $<24><> <20> )<29><1E>{<7B>{<7B>4<EFBFBD>(<28>(<28> )<29>s<00>D<00>!D7<03>6D7c<01>$<00>V^8<>dQhRRRRRR/#)r^r<>rr<>zdict[str, Any]rzr{r|)r}s"r~rr<><00>s$<00><00>!<21>!<21>%<25>!<21>0><3E>!<21> <0A>!r<>c <0A><>aa<05>\S4pRP\V44oRVV3Rllp\V!44R#)zZ
Handler for event loop exceptions.
This will print the exception, using run_in_terminal.
r<EFBFBD>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>3Application._handle_exception.<locals>.__annotate__<5F>s<00><00> G<01> G<01>t<EFBFBD> Gr<>c <00><01>P<"<00>\4;_uu_4GRjx<01>L
\R4\S4\RPSPR444\ R4GRjx<01>L
RRR4GRjx<01>L
R#LhLL
+GRjx<01>L
'giR#;i5i)Nz#
Unhandled exception in event loop:z Exception {}r<><00>Press ENTER to continue...)rT<00>printr}<00>get<65>_do_wait_for_enter)r<><00> formatted_tbs<00><>r~<00>in_term<72>.Application._handle_exception.<locals>.in_term<72>sg<00><><00><00>"<22>}<7D>}<7D>}<7D><16><<3C>=<3D><15>l<EFBFBD>#<23><15>n<EFBFBD>+<2B>+<2B>G<EFBFBD>K<EFBFBD>K<EFBFBD> <0B>,D<>E<>F<>(<28>)E<>F<>F<>F<>%<25>}<7D>}<7D>G<01>%<25>}<7D>}<7D>}<7D>s]<00>B&<01>B<08>B&<01>AB <05>,B<08>-B <05>1 B&<01><B<04>=B&<01>B <05>B&<01> B# <09>B<0E>
B# <09>B# <09> B&N)r"r<>r r)r<>r<>r<><00>tbr<62>r<>s&&f @r~r}<00>Application._handle_exception<6F>s9<00><><00>(<28><07> 0<><02><19>w<EFBFBD>w<EFBFBD>y<EFBFBD><12>}<7D>-<2D> <0C> G<01> G<01> <16>g<EFBFBD>i<EFBFBD> r<>c<01><00>V^8<>dQhRR/#<00>r^rz<00>Generator[None, None, None]r|)r}s"r~rr<>s<00><00><12><12>(C<>r<>c# <0A>"<00>\P\P8Xd6VP\nRx<00>\P\nR#Rx<00>R# \P\ni;i5i)z<>
Install our custom breakpointhook for the duration of this context
manager. (We will only install the hook if no other custom hook was
set.)
N)r<><00>breakpointhook<6F>__breakpointhook__<5F>_breakpointhookr<6B>s&r~r<><00>"Application._enable_breakpointhooksS<00><00><00> <0F> <1D> <1D><13>!7<>!7<> 7<>!%<25>!5<>!5<>C<EFBFBD> <1E> <<3C><15>%(<28>%;<3B>%;<3B><03>"<22> <11><>&)<29>%;<3B>%;<3B><03>"<22>s<00>9A?<01>A!<00>!A?<01>!A<<03><A?c<01>$<00>V^8<>dQhRRRRRR/#)r^<00>ar<00>kwrzr{r|)r}s"r~rr<>s&<00><00>S:<3A>S:<3A>&<26>S:<3A><06>S:<3A>4<EFBFBD>S:r<>c <0A>jaaa a
<EFBFBD>So^RIp^RIHp\V\\
.\
3,p\ RV3Rll4o \ RVV3Rll4o
!VV V
3RlRVP4p\P!4PpV!\PR 7PV4R#)
a=
Breakpointhook which uses PDB, but ensures that the application is
hidden and input echoing is restored during each debugger dispatch.
This can be called from any thread. In any case, the application's
event loop will be blocked while the PDB input is displayed. The event
will continue after leaving the debugger.
N)<01> FrameTypec<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>1Application._breakpointhook.<locals>.__annotate__(s<00><00> <1A> <1A>0K<30> r<>c 3<05>F<"<00>SPP4SPP4;_uu_4SPP 4;_uu_4Rx<00>RRR4RRR4R# +'giL;i +'giR#;i5i)zTStop application if `__breakpointhook__` is called from within
the App's event loop.N)r<>r<>rx<00>detach<63> cooked_mode)<01>apps<00>r~<00>hide_app_from_eventloop_thread<61>CApplication._breakpointhook.<locals>.hide_app_from_eventloop_thread'sb<00><><00><00>
<10>L<EFBFBD>L<EFBFBD> <1E> <1E> <20><15><19><19>!<21>!<21>#<23>#<23><18>Y<EFBFBD>Y<EFBFBD>*<2A>*<2A>,<2C>,<2C><19>-<2D>$<24>#<23>,<2C>,<2C><>$<24>#<23>#<23>s5<00>=B!<01>#B <05>#A: <09>(B <05>0
B!<01>: B
<0A>B <05> B <09> B!c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<>9s<00><00> <1B> <1B>,G<> r<>c3<05><aa"<00>\P!4o\P!4oRVVV3RllpSPV!44SP4Rx<00>SP 4R# SP 4i;i5i)zaStop application if `__breakpointhook__` is called from a
thread other than the App's event loop.c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>UApplication._breakpointhook.<locals>.hide_app_from_other_thread.<locals>.__annotate__?s<00><00> $<24> $<24>4<EFBFBD> $r<>c <00><01>~<"<00>SPP4SPP4;_uu_4SPP 4;_uu_4SP 4SP 4RRR4RRR4R# +'giL;i +'giR#;i5ir<>)r<>r<>rxr<>r<>r<><00>wait)r<>r><00>readys<00><><EFBFBD>r~<00>in_loop<6F>PApplication._breakpointhook.<locals>.hide_app_from_other_thread.<locals>.in_loop?ss<00><><00><00><14> <0C> <0C>"<22>"<22>$<24><19>Y<EFBFBD>Y<EFBFBD>%<25>%<25>'<27>'<27><1C><19><19>.<2E>.<2E>0<>0<><1D> <09> <09> <0B> <1D> <09> <09> <0B>1<>(<28>'<27>0<>0<><30>(<28>'<27>'<27>s5<00>=B=<01>#B)<05>#!B <09>B)<05>
B=<01> B& <0A>!B)<05>) B: <09>4 B=N)rbrPr<>r<>r<>)r<>r>r<>r<>r<>s @@<40><>r~<00>hide_app_from_other_thread<61>?Application._breakpointhook.<locals>.hide_app_from_other_thread8s_<00><><00><00><1E>O<EFBFBD>O<EFBFBD>%<25>E<EFBFBD><1C>?<3F>?<3F>$<24>D<EFBFBD> $<24> $<24>* <11> '<27> '<27><07> <09> 2<> <11>J<EFBFBD>J<EFBFBD>L<EFBFBD> <1B><15><14><08><08>
<EFBFBD><EFBFBD><04><08><08>
<EFBFBD>s<00>AB <01>"A8<00>&B <01>8B
<03>
B c<01>6<a<00>]tRtRtRVVVV3RlltRtV;t#)<05>.Application._breakpointhook.<locals>.CustomPdbi[c<01>(<00>V^8<>dQhRRRRRRRR/#) r^<00>framer<65><00>event<6E>str<74>argrrz<00> TraceDispatchr|)r}s"r~r<00>;Application._breakpointhook.<locals>.CustomPdb.__annotate__\s2<00><00> E<01> E<01>&<26> E<01>/2<> E<01>9<<3C> E<01><1E> Er<>c <09>~<<04>SPf\SV` WV4#SP\P!48Xd+S!4;_uu_4\SV` WV4uuRRR4#S!4;_uu_4\SV` WV4uuRRR4# +'giL:;i +'giR#;ir<>)r<><00>super<65>trace_dispatchrbrc)r<>r<>r<>r<><00> __class__r<5F>r<>r<>s&&&&<26><><EFBFBD><EFBFBD>r~r<><00>=Application._breakpointhook.<locals>.CustomPdb.trace_dispatch\s<><00><><00><17>#<23>#<23>+<2B> <20>7<EFBFBD>1<>%<25><03>D<>D<><16>#<23>#<23>y<EFBFBD>'?<3F>'?<3F>'A<>A<>7<>9<>9<>$<24>w<EFBFBD>5<>e<EFBFBD>C<EFBFBD>H<>:<3A>9<>0<>1<>1<> <20>7<EFBFBD>1<>%<25><03>D<>2<>1<>:<3A>9<><39>2<>1<>1<>s<00>B<05>=B+<05> B( <09>+ B< r|)<07>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__r<5F><00>__static_attributes__<5F> __classcell__)r<>r<>r<>r<>s@<40><><EFBFBD>r~<00> CustomPdbr<62>[s<00><><00> E<01> E<01> Er<>r<>)<01>stdout) <0A>pdb<64>typesr<73>rr<>rr <00>Pdbr<62>r<><00>f_back<63>
__stdout__<EFBFBD> set_trace) r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>s f*, @@@r~r<><00>Application._breakpointhooks<><00><><00><13><03><12>#<23> <20>)<29>S<EFBFBD>#<23>!6<><03>!;<3B><<3C> <0A> <17> <1A>
<18> <1A>
<18> <1B> <1B>
<18> <1B>D E<01> E<01><03><07><07> E<01><14> <0A> <0A><0F>&<26>&<26><05><11><13><1E><1E>(<28>2<>2<>5<EFBFBD>9r<39>c<01> <00>V^8<>dQhRRRR/#)r^<00> coroutinezCoroutine[Any, Any, None]rz<00>asyncio.Task[None]r|)r}s"r~rr<>ls<00><00><14><14>2<><14> <1B>r<>c <0A><><00>VP;'g \4pVPV4pVPP V4VP VP 4V#)ay
Start a background task (coroutine) for the running application. When
the `Application` terminates, unfinished background tasks will be
cancelled.
Given that we still support Python versions before 3.11, we can't use
task groups (and exception groups), because of that, these background
tasks are not allowed to raise exceptions. If they do, we'll call the
default exception handler from the event loop.
If at some point, we have Python 3.11 as the minimum supported Python
version, then we can use a `TaskGroup` (with the lifetime of
`Application.run_async()`, and run run the background tasks in there.
This is not threadsafe.
)r<>r<00> create_taskr<6B><00>add<64>add_done_callback<63>_on_background_task_done)r<>rr<><00>tasks&& r~r<><00>"Application.create_background_tasklsV<00><00>&<14>y<EFBFBD>y<EFBFBD>.<2E>.<2E>,<2C>.<2E><04>#'<27>#3<>#3<>I<EFBFBD>#><3E><04> <0C><1E><1E>"<22>"<22>4<EFBFBD>(<28> <0C><1E><1E>t<EFBFBD><<3C><<3C>=<3D><13> r<>c<01> <00>V^8<>dQhRRRR/#)r^r rrzr{r|)r}s"r~rr<><00>s<00><00><0E><0E>-?<3F><0E>D<EFBFBD>r<>c <0A><><00>VPPV4VP4'dR#VP4pVe'\ 4P RRV: R2RVRV/4R#R#)zl
Called when a background task completes. Remove it from
`_background_tasks`, and handle exceptions if any.
N<EFBFBD>messagez+prompt_toolkit.Application background task z raised an unexpected exception.r<>r )r<><00>discard<72> cancelledr<64>r<00>call_exception_handler)r<>r <00>excs&& r~r
<00>$Application._on_background_task_done<6E>ss<00><00>
<0A><1E><1E>&<26>&<26>t<EFBFBD>,<2C> <0F>><3E>><3E> <1B> <1B> <12><12>n<EFBFBD>n<EFBFBD><1E><03> <0E>?<3F> <1C> <1E> 5<> 5<><1D>!L<>T<EFBFBD>H<EFBFBD>U6<> 6<><1F><13><1A>D<EFBFBD> <12> <0E> r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00><0E><0E>D<EFBFBD>r<>c<00> <0A>"<00>VPFpVP4K \VP4^8<>d<\P!VPR\P
R7GRjx<01>L
R#R#L5i)z<>
Cancel all background tasks, and wait for the cancellation to complete.
If any of the background tasks raised an exception, this will also
propagate the exception.
(If we had nurseries like Trio, this would be the `__aexit__` of a
nursery.)
N)<02>timeout<75> return_when)r<>rA<00>lenr<6E>r<><00> ALL_COMPLETED)r<>r s& r~r<><00>0Application.cancel_and_wait_for_background_tasks<6B>sh<00><00><00><19>*<2A>*<2A>D<EFBFBD> <10>K<EFBFBD>K<EFBFBD>M<EFBFBD>+<2B>$ <0F>t<EFBFBD>%<25>%<25> &<26><11> *<2A><19>,<2C>,<2C><14>&<26>&<26><04>'<27>BW<42>BW<42><0E> <0E> <0E> +<2B> <0E>s<00>A2A?<01>4A=<04>5 A?c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00><1C><1C><14>r<>c<00> <0A><>"<00>RpVPpVfR#\P!V4GRjx<01>L
VPP 4pVeW18wdVP 4TpKWL<5i)z<>
Coroutine for polling the terminal dimensions.
Useful for situations where `attach_winch_signal_handler` is not sufficient:
- If we are not running in the main thread.
- On Windows.
N)rrr<>r ry<00>get_sizer$)r<><00>size<7A>interval<61>new_sizes& r~rX<00>Application._poll_output_size<7A>sf<00><00><00>!<21><04><17>6<>6<><08> <13> <1B> <12><12><19>-<2D>-<2D><08>)<29> )<29> )<29><1B>{<7B>{<7B>+<2B>+<2B>-<2D>H<EFBFBD><13><1F>H<EFBFBD>$4<><14><0F><0F>!<21><1B>D<EFBFBD> *<2A>s<00>/A0<01>A.<04>=A0c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00> %<25> %<25>D<EFBFBD> %r<>c <0A>la<00>SPP'gR#RV3Rllp\V4R#)zD
Called when we don't receive the cursor position response in time.
Nc<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00><Application.cpr_not_supported_callback.<locals>.__annotate__<5F>s<00><00> <20> <20>T<EFBFBD> r<>c<01>r<<01>SPPR4SPP4R#)zHWARNING: your terminal doesn't support cursor position requests (CPR).
N)ry<00>write<74>flushr<68>s<00>r~rT<00>;Application.cpr_not_supported_callback.<locals>.in_terminal<61>s*<00><><00> <10>K<EFBFBD>K<EFBFBD> <1D> <1D>\<5C> <0E> <11>K<EFBFBD>K<EFBFBD> <1D> <1D> r<>)ryrYrU)r<>rTsf r~r<><00>&Application.cpr_not_supported_callback<63>s,<00><><00><14>{<7B>{<7B>*<2A>*<2A>*<2A> <12> <20> <20> <18> <0B>$r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<><00>s<00><00>"<22>"<22>d<EFBFBD>"r<>c <0A><00>R#)zExit without arguments.Nr|r<>s&r~<00>exit<69>Application.exit<69><00><00>r<>r`r<>c<01>$<00>V^8<>dQhRRRRRR/#)r^r\rWr`r<>rzr{r|)r}s"r~rr<><00>s!<00><00>"<22>"<22>j<EFBFBD>"<22><13>"<22>d<EFBFBD>"r<>c <0A><00>R#)zExit with `_AppResult`.Nr|)r<>r\r`s&$$r~r.r/<00>r0r<>c<01>$<00>V^8<>dQhRRRRRR/#)r^r<>z#BaseException | type[BaseException]r`r<>rzr{r|)r}s"r~rr<><00>s$<00><00><1F><1F>?<3F><1F>HK<48><1F> <0A>r<>c <0A><00>R#)zExit with exception.Nr|)r<>r<>r`s&$$r~r.r/<00>r0r<>c<01>(<00>V^8<>dQhRRRRRRRR/#) r^r\z_AppResult | Noner<65>z*BaseException | type[BaseException] | Noner`r<>rzr{r|)r}s"r~rr<><00>s2<00><00>%=<3D>%=<3D>!<21>%=<3D>><3E>%=<3D><13> %=<3D>
<0E> %=r<>c <0A>B<00>VeVeQhVPf \R4hVPP4'd \R4hW0nVeVPP V4R#VPP \ \V44R#)a<>
Exit application.
.. note::
If `Application.exit` is called before `Application.run()` is
called, then the `Application` won't exit (because the
`Application.future` doesn't correspond to the current run). Use a
`pre_run` hook and an event to synchronize the closing if there's a
chance this can happen.
:param result: Set this result for the application.
:param exception: Set this exception as the result for an application. For
a prompt, this is often `EOFError` or `KeyboardInterrupt`.
:param style: Apply this style on the whole content when quitting,
often this is 'class:exiting' for a prompt. (Used when
`erase_when_done` is not set.)
Nz6Application is not running. Application.exit() failed.z4Return value already set. Application.exit() failed.)r<><00> Exceptionr>r<>r?<00>
set_resultrrW)r<>r\r<>r`s&&&&r~r.r/<00>s<00><00>0<16>~<7E><19>!2<>2<>2<> <0F>;<3B>;<3B> <1E><1B>T<>U<> U<> <0F>;<3B>;<3B> <1B> <1B> <1D> <1D><1B>R<>S<> S<><1F><0F> <14> <20> <10>K<EFBFBD>K<EFBFBD> %<25> %<25>i<EFBFBD> 0<> <10>K<EFBFBD>K<EFBFBD> "<22> "<22>4<EFBFBD>
<EFBFBD>F<EFBFBD>#;<3B> <r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<>s<00><00>=<3D>=<3D>4<EFBFBD>=r<>c <0A><><00>VPP'g1VP'gVPP 4R#R#R#)z
Send CPR request.
N)r<><00> input_queuer<65>r<><00> request_absolute_cursor_positionr<6E>s&r~r#<00>-Application._request_absolute_cursor_positions7<00><00><14>!<21>!<21>-<2D>-<2D>-<2D>d<EFBFBD>l<EFBFBD>l<EFBFBD>l<EFBFBD> <10>M<EFBFBD>M<EFBFBD> :<3A> :<3A> <<3C>7C<01>-r<>c
<01>,<00>V^8<>dQhRRRRRRRRRR /#)
r^<00>commandr<64><00>wait_for_enterrg<00>display_before_textr*<00> wait_textrzr{r|)r}s"r~rr<>s<<00><00>(4<>(4<><14>(4<><1D>(4<>.<2E> (4<>
<17> (4<>
<0E> (4r<34>c<00> <0A>Vaaaaa"<00>\4;_uu_4GRjx<01>L
SPP4oSP P4oRVVVVV3Rllp\V4GRjx<01>L
V'd\V4GRjx<01>L
RRR4GRjx<01>L
R#L<> \d"\P
P4oL<>i;i \d"\PP4oL<>i;iL<>LxLj +GRjx<01>L
'giR#;i5i)an
Run system command (While hiding the prompt. When finished, all the
output will scroll above the prompt.)
:param command: Shell command to be executed.
:param wait_for_enter: FWait for the user to press enter, when the
command is finished.
:param display_before_text: If given, text to be displayed before the
command executes.
:return: A `Future` object.
Nc<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>4Application.run_system_command.<locals>.__annotate__>s<00><00> <19> <19><14> r<>c<01>h<<05>SPS4\SRSSR7pVP4R#)T)<03>shell<6C>stdinr<6E>N)<03>
print_textr r<>)<06>pr?rA<00>input_fd<66> output_fdr<64>s <20><><EFBFBD><EFBFBD><EFBFBD>r~<00> run_command<6E>3Application.run_system_command.<locals>.run_command>s)<00><><00><14><0F><0F> 3<>4<><19>'<27><14>X<EFBFBD>i<EFBFBD>P<><01><11><06><06>r<>)
rTrx<00>fileno<6E>AttributeErrorr<72>rHryr<>r$r<>)r<>r?r@rArBrMrKrLsff&f& @@r~<00>run_system_command<6E>Application.run_system_commands<><00><><00><00>$<1F>=<3D>=<3D>=<3D> .<2E><1F>:<3A>:<3A>,<2C>,<2C>.<2E><08> 0<> <20>K<EFBFBD>K<EFBFBD>.<2E>.<2E>0<> <09>
 <19> <19>
/<2F>{<7B>;<3B> ;<3B> ;<3B><1E>(<28><19>3<>3<>3<>-!<21>=<3D>=<3D><>
"<22> .<2E><1E>9<EFBFBD>9<EFBFBD>+<2B>+<2B>-<2D><08> .<2E><>"<22> 0<><1F>J<EFBFBD>J<EFBFBD>-<2D>-<2D>/<2F> <09> 0<><30> <<3C>4<>-!<21>=<3D>=<3D>=<3D>s<EFBFBD><00>D)<01>B&<08>D)<01>D <05>B(<04>C<04>D <05>4D<08>5 D <05>D <05>D<08>D <05> D)<01>D
<04> D)<01>()C<07>D <05>C<07>D <05>)D<07>D <05>D<07>D <05>D <05>
D)<01> D& <09>D<0E>
D& <09>D& <09> D)c<01> <00>V^8<>dQhRRRR/#)r^<00> suspend_grouprgrzr{r|)r}s"r~rr<>Is<00><00>!<21>!<21>4<EFBFBD>!<21>4<EFBFBD>!r<>c <0A>Da<01>\eRV3Rllp\V4R#R#)z<>
(Not thread safe -- to be called from inside the key bindings.)
Suspend process.
:param suspend_group: When true, suspend the whole process group.
(This is the default, and probably what you want.)
Nc<01><00>V^8<>dQhRR/#r<>r|)r}s"r~r<00>7Application.suspend_to_background.<locals>.__annotate__Us<00><00>
1<>
1<><14>
1r<31>c<01><><<01>\\\4pS'd\P!^V4R#\P!\P
!4V4R#)rN)r<00>int<6E>_SIGTSTP<54>os<6F>kill<6C>getpid)rurTs <20>r~r<00>.Application.suspend_to_background.<locals>.runUs6<00><><00><1D>c<EFBFBD>8<EFBFBD>,<2C><06> !<21><16>G<EFBFBD>G<EFBFBD>A<EFBFBD>v<EFBFBD>&<26><16>G<EFBFBD>G<EFBFBD>B<EFBFBD>I<EFBFBD>I<EFBFBD>K<EFBFBD><16>0r<30>)rZrU)r<>rTrs&f r~<00>suspend_to_background<6E>!Application.suspend_to_backgroundIs$<00><><00> <14> <1F>
1<>
1<> <1C>C<EFBFBD> <20> r<>c<01>$<00>V^8<>dQhRRRRRR/#)r^<00>textr*r`rarzr{r|)r}s"r~rr<>cs$<00><00>
<EFBFBD>
<EFBFBD>$<24>
<EFBFBD>-=<3D>
<EFBFBD> <0A>
r<EFBFBD>c <0A><><00>\VPTT;'g VPVPVPR7R#)a,
Print a list of (style_str, text) tuples to the output.
(When the UI is running, this method has to be called through
`run_in_terminal`, otherwise it will destroy the UI.)
:param text: List of ``(style_str, text)`` tuples.
:param style: Style class to use. Defaults to the active style in the CLI.
)ry<00>formatted_textr`rhrcN)rFryr<>rhrc)r<>rbr`s&&&r~rI<00>Application.print_textcs9<00><00> <1D><17>;<3B>;<3B><1F><17>-<2D>-<2D>4<EFBFBD>-<2D>-<2D><1C>(<28>(<28>!%<25>!:<3A>!:<3A> 
r<EFBFBD>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<>ws<00><00> <20> <20>D<EFBFBD> r<>c <0A><00>VP#)z8`True` when the application is currently active/running.rir<>s&r~<00>
is_running<EFBFBD>Application.is_runningvs<00><00><14><1F><1F>r<>c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<>|s<00><00><15><15><14>r<>c <09>^<00>VP'dVPP4#R#<00>F)r<>r>r<>s&r~r<><00>Application.is_done{s!<00><00> <0F>;<3B>;<3B>;<3B><17>;<3B>;<3B>#<23>#<23>%<25> %<25>r<>c<01><00>V^8<>dQhRR/#)r^rzz list[str]r|)r}s"r~rr<><00>s<00><00> <12> <12> <09> r<>c <0A><><00>VPPpV'd!\RVP444#.#)zd
Return a list of used style strings. This is helpful for debugging, and
for writing a new `Style`.
c3<01>n"<00>TF+p\P!RRV4P4x<00>K- R#5i)z\s+<2B> N)<03>re<72>sub<75>strip)<02>.0<EFBFBD> style_strs& r~<00> <genexpr><3E>5Application.get_used_style_strings.<locals>.<genexpr><3E>s0<00><00><00><0E>!7<>I<EFBFBD><13><06><06>v<EFBFBD>s<EFBFBD>I<EFBFBD>.<2E>4<>4<>6<>6<>!7<>s<00>35)r<><00>_attrs_for_style<6C>sortedrB)r<><00>attrs_for_styles& r~<00>get_used_style_strings<67>"Application.get_used_style_strings<67>s@<00><00>
<1F>-<2D>-<2D>8<>8<><0F> <1A><19><0E>!0<>!5<>!5<>!7<><0E><0E> <0E>
<12> r<>)0r<30>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rwrvrer<>rsrlr<>rjrmr<>rfr<>rxrdr<>r_r<>rprorirurtryrkr<>r<>rqr<>r<>rnr`rcrrr<>r<>r<>rlr<>)NTTr\)NTTFN)NNr<4E>)Tr<54>r<>)T)+r<>r<>r<>r<><00>__doc__r <00>EMACSr<53>r<><00>propertyrhr<>r<>r<>r<>r<>r<>r r<>rr$r*r<>rr}r r<>r<>r<>r
r<>rXr<>rr.r#rQr_rIrhr<>r|r<>r|r<>r~rVrVis<><00><00>N<08>d!%<25>"&<26>7;<3B>;?<3F>/3<>&*<2A>!<21>MQ<4D>&+<2B><1F>#(<28>$/<2F>$5<>$5<> %<25>49<34>26<32>7;<3B>)-<2D>7:<3A>'+<2B>?C<>DH<44>DH<44>CG<43>"<22> $<24>9W<15>r
<EFBFBD>.<0E><15><0E><15>.<0E>

<EFBFBD><0E>

<EFBFBD><0E> !<21><0E> !<21><1A>@3<1E>j<0E>!<21><0E>!<21>*4<>X M<01>+<2B>*<1A>
<17>&<26>$V$<24>pf%<25>P!<21>4<14><12><14><12> S:<3A>j<14>4<0E>*<0E>@<1C>, %<25><0E>"<22><0E>"<22><0E>"<22>r<EFBFBD>"<22><0E>"<22><0E><1F>NP<4E><1F><0E><1F>
%=<3D>N=<3D>(4<>T!<21>4
<EFBFBD>&<0E> <20><0E> <20><0E><15><0E><15>
<12> r<>c<01><><00>]tRtRtRtRRlt]RRl4t]RRl4tR R
lt ]R R l4t
R Rlt RRlt Rt R#)r<>i<>z<>
The `KeyBindings` of key bindings for a `Application`.
This merges the global key bindings with the one of the current user
control.
c<01> <00>V^8<>dQhRRRR/#)r^r<>rXrzr{r|)r}s"r~r<00>_CombinedRegistry.__annotate__<5F>s<00><00><1A><1A>3<><1A><04>r<>c <09>0<00>Wn\4VnR#r<>)r<>r<00>_cache)r<>r<>s&&r~r<><00>_CombinedRegistry.__init__<5F>s<00><00><16><08> <18>M<EFBFBD> <0A> r<>c<01><00>V^8<>dQhRR/#)r^rzrr|)r}s"r~rr<><00>s<00><00>"<22>"<22>(<28>"r<>c <0A><00>\h<01>zRNot needed - this object is not going to be wrapped in another
KeyBindings object.<2E><01>NotImplementedErrorr<72>s&r~<00>_version<6F>_CombinedRegistry._version<6F><00>
<00><00>"<22>!r<>c<01><00>V^8<>dQhRR/#)r^rz<00> list[Binding]r|)r}s"r~rr<><00>s<00><00>"<22>"<22>-<2D>"r<>c <0A><00>\hr<>r<>r<>s&r~<00>bindings<67>_CombinedRegistry.bindings<67>r<>r<>c<01>$<00>V^8<>dQhRRRRRR/#)r^r<>r=<00>other_controlszlist[UIControl]rzr5r|)r}s"r~rr<><00>s$<00><00>40<>40<>$<24>40<>6E<36>40<> <18>40r<30>c <0A>*<00>.p\4pTpVPV4VP4pVeVPV4VP 4'dM.VP
P PV4pVfMTpK|\V4F;pW<>9gK VP4pVfK!VP\V44K= VP
P'd&VPVP
P4VP\VP
PVP
P44VPVP
P4VRRR1,p\V4#)z<>
Create a `KeyBindings` object that merges the `KeyBindings` from the
`UIControl` with all the parent controls and the global key bindings.
N<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)r<>r<00>get_key_bindings<67>append<6E>is_modalr<6C>r_<00>
get_parentrBr3rdr2r<>rjr<>r7) r<>r<>r<>rd<00>collected_containers<72> container<65>kb<6B>parentrs &&& r~<00>_create_key_bindings<67>&_CombinedRegistry._create_key_bindings<67>sO<00><00><1A> <0C>"<22>u<EFBFBD><1C> .<2E> <09><12> <20> $<24> $<24>Y<EFBFBD> /<2F><1A>+<2B>+<2B>-<2D>B<EFBFBD><11>~<7E><1C>#<23>#<23>B<EFBFBD>'<27><18>!<21>!<21>#<23>#<23><15><19>X<EFBFBD>X<EFBFBD>_<EFBFBD>_<EFBFBD>/<2F>/<2F> <09>:<3A>F<EFBFBD><15>~<7E><15>"<22> <09><16>i<EFBFBD><1F>A<EFBFBD><10>,<2C><16>'<27>'<27>)<29><02><15>><3E> <20>'<27>'<27>(=<3D>b<EFBFBD>(A<>B<> !<21> <10>8<EFBFBD>8<EFBFBD> <20> <20> <20> <18> <1F> <1F><04><08><08> 5<> 5<> 6<> <15><1B><1B> "<22><14><08><08>2<>2<><14><08><08>8<>8<> <0E>
<EFBFBD> <15><1B><1B>D<EFBFBD>H<EFBFBD>H<EFBFBD>6<>6<>7<>$<24>D<EFBFBD>b<EFBFBD>D<EFBFBD>)<29> <0C>!<21>,<2C>/<2F>/r<>c<01><00>V^8<>dQhRR/#)r^rzr5r|)r}s"r~rr<><00>s<00><00>
<EFBFBD>
<EFBFBD><EFBFBD>
r<EFBFBD>c <09>aaa<03>SPPPo\SPPP 44oS\ S43pSP PVVVV3Rl4#)c<01>(<<03>SPSS4#r<>)r<>)r<>r<>r<>s<00><><EFBFBD>r~r<><00>1_CombinedRegistry._key_bindings.<locals>.<lambda><3E>s<00><><00><14>2<>2<>><3E>><3E>Rr<52>)r<>r_r<>rr<00> frozensetr<74>r<>)r<><00>keyr<79>r<>sf @@r~<00> _key_bindings<67>_CombinedRegistry._key_bindings<67>s[<00><><00><1D><18><18><1F><1F>7<>7<><0E><1D>d<EFBFBD>h<EFBFBD>h<EFBFBD>o<EFBFBD>o<EFBFBD>?<3F>?<3F>A<>B<><0E><1C>i<EFBFBD><0E>7<>7<><03><13>{<7B>{<7B><EFBFBD><EFBFBD> <0F>R<>
<EFBFBD>
r<EFBFBD>c<01> <00>V^8<>dQhRRRR/#<00>r^rBr6rzr<>r|)r}s"r~rr<><00>s<00><00>><3E>><3E>)<29>><3E> <0A>>r<>c <09>8<00>VPPV4#r<>)r<><00>get_bindings_for_keys<79>r<>rBs&&r~r<><00>'_CombinedRegistry.get_bindings_for_keys<79>s<00><00><13>!<21>!<21>7<>7<><04>=<3D>=r<>c<01> <00>V^8<>dQhRRRR/#r<>r|)r}s"r~rr<><00>s<00><00>H<01>H<01>I<EFBFBD>H<01>-<2D>Hr<>c <09>8<00>VPPV4#r<>)r<><00>get_bindings_starting_with_keysr<73>s&&r~r<><00>1_CombinedRegistry.get_bindings_starting_with_keys<79>s<00><00><13>!<21>!<21>A<>A<>$<24>G<>Gr<47>)r<>r<>N)r<>r<>r<>r<>r~r<>r<>r<>r<>r<>r<>r<>r<>r<>r|r<>r~r<>r<><00>s_<00><00><08> <1A> <0E>"<22><0E>"<22>
<0E>"<22><0E>"<22>
40<>l<0E>
<EFBFBD><0E>
<EFBFBD>><3E>H<01>Hr<>r<>c<01> <00>V^8<>dQhRRRR/#)r^rBr*rzr{r|)r}s"r~rr<00>s<00><00> <0A> <0A>(8<> <0A>T<EFBFBD> r<>c<00><05>2"<00>^RIHp\4pVPR4RRl4pVP\P
4RRl4pV!WR7pVP P4GRjx<01>L
R#L \dR#i;i5i) z<>
Create a sub application to wait for the enter key press.
This has two advantages over using 'input'/'raw_input':
- This will share the same input/output I/O.
- This doesn't block the event loop.
)<01> PromptSession<6F>enterc<01> <00>V^8<>dQhRRRR/#<00>r^r<><00>Erzr{r|)r}s"r~r<00>(_do_wait_for_enter.<locals>.__annotate__<5F>s<00><00><19><19>1<EFBFBD><19><14>r<>c<01>:<00>VPP4R#r<>)r<>r.<00>r<>s&r~<00>_ok<6F>_do_wait_for_enter.<locals>._ok<6F>s<00><00> <0A> <09> <09><0E><0E>r<>c<01> <00>V^8<>dQhRRRR/#r<>r|)r}s"r~rr<>s<00><00> <0A> <0A>q<EFBFBD> <0A>T<EFBFBD> r<>c<05><00>R#)zDisallow typing.Nr|r<>s&r~<00>_ignore<72>#_do_wait_for_enter.<locals>._ignores<00><00> r<>)rrdN) <09>prompt_toolkit.shortcutsr<73>r4rr;rr<>r<><00>KeyboardInterrupt)rBr<>rdr<>r<>r<>s& r~r<>r<><00>s<><00><00><00>7<><1E>=<3D>L<EFBFBD><11><15><15>g<EFBFBD><1E><19><1F><19><12><15><15>d<EFBFBD>h<EFBFBD>h<EFBFBD><1F> <0A> <20> <0A>$1<><19>$<06>G<EFBFBD> <0A><15>k<EFBFBD>k<EFBFBD>#<23>#<23>%<25>%<25>%<25><> <1C> <0A> <0C> <0A>s<<00>AB<01>B<00><B<04>=B<00>B<01>B<00> B<03>B<01>B<03>Bc<01> <00>V^8<>dQhRRRR/#)r^<00>handlerzCallable[[], None]rzr<>r|)r}s"r~rrs<00><00>)<0E>)<0E> <1F>)<0E> <20>)r<>c#<05><>"<00>\\RR4pVe\4'gRx<00>R#\4p\VR/4P V4pVP W4Rx<00>VP V4Ve,VP
!VVP.VPO5!R#R# TP T4Te+TP
!TTP.TPO5!ii;i5i)a<>
Attach the given callback as a WINCH signal handler within the context
manager. Restore the original signal handler when done.
The `Application.run` method will register SIGWINCH, so that it will
properly repaint when the terminal window resizes. However, using
`run_in_terminal`, we can temporarily send an application to the
background, and run an other app in between, which will then overwrite the
SIGWINCH. This is why it's important to restore the handler when the app
terminates.
rYN<>_signal_handlers) <09>getattrrurQrr<>rtrw<00> _callback<63>_args)r<><00>sigwinchr<68><00>previous_winch_handlers& r~rWrWs<><00><00><00>*<17>v<EFBFBD>z<EFBFBD>4<EFBFBD>0<>H<EFBFBD><0F><17>~<7E>/<2F>/<2F> <0A><0E> <1C> <1D>D<EFBFBD>$<24>T<EFBFBD>+=<3D>r<EFBFBD>B<>F<>F<>x<EFBFBD>P<><1A> <0E> <0C><1F><1F><08>2<> <0A> <0A>"<22>"<22>8<EFBFBD>,<2C> !<21> -<2D> <10> #<23> #<23><18>&<26>0<>0<> <0E>(<28>-<2D>-<2D> <0E> .<2E><> <0A>"<22>"<22>8<EFBFBD>,<2C> !<21> -<2D> <10> #<23> #<23><18>&<26>0<>0<> <0E>(<28>-<2D>-<2D> <0E> .<2E>s <00>AC0<01>B,<00>*AC0<01>,AC-<03>-C0c<01><00>V^8<>dQhRR/#r<>r|)r}s"r~rr<s<00><00>"<<3C>"<<3C>%@<40>"<r<>c#<01>"<00>^RIHpHpHp\P
P R8gpV'dGXXPn X3VPn
WPn VV3VPn
\P!\P4pV'd XP\P4pRx<00>Ve&\P!\PV4V'd#XP\PX4R#R# \dRpELi;i Te&\P!\PT4T'd"XP\PX4ii;i5i)r)<03>c_int<6E>c_void_p<5F> pythonapi<70>graalpyFN)<0F>ctypesr<73>r<>r<>r<><00>implementationr<6E><00> ImportError<6F> PyOS_getsig<69>restype<70>argtypes<65> PyOS_setsigru<00> getsignalrv)r<>r<>r<><00>have_ctypes_signal<61>sigint<6E> sigint_oss r~rsrs;s%<00><00><00>
B<01>5<>5<>
!<21>/<2F>/<2F>4<>4<> <09>A<><1A><19>(0<> <09><1D><1D>%<25>*/<2F><18> <09><1D><1D>&<26>)1<><1D><1D>%<25> <11> <14>*
<EFBFBD> <09><1D><1D>&<26>
<14> <1D> <1D>f<EFBFBD>m<EFBFBD>m<EFBFBD> ,<2C>F<EFBFBD><19><1D>)<29>)<29>&<26>-<2D>-<2D>8<> <09><<3C> <0A> <11> <1D> <12>M<EFBFBD>M<EFBFBD>&<26>-<2D>-<2D><16> 0<> <1D> <15> !<21> !<21>&<26>-<2D>-<2D><19> ;<3B> <1E><>7 <17>#<23>"<22><1A>#<23><>2 <12> <1D> <12>M<EFBFBD>M<EFBFBD>&<26>-<2D>-<2D><16> 0<> <1D> <15> !<21> !<21>&<26>-<2D>-<2D><19> ;<3B> <1E>sW<00>F <01>
D<00>$F <01>A1F <01>%F <01>D2<00> 0F <01>:$F <01> D/<03>+F <01>.D/<03>/F <01>21F<03>$"F<03>F )<29><>
__future__rr<>rSr[rrrur<>rbr<>rrrrrr <00>
contextlibr
r <00>
subprocessr <00> tracebackr <00>typingrrrrrrrrrrr<00>prompt_toolkit.bufferr<00>prompt_toolkit.cacher<00>prompt_toolkit.clipboardrr<00>prompt_toolkit.cursor_shapesrr<00>prompt_toolkit.data_structuresr<00>prompt_toolkit.enumsr <00>prompt_toolkit.eventloopr!r"r#r$<00>prompt_toolkit.eventloop.utilsr%<00>prompt_toolkit.filtersr&r'r(r)<00>prompt_toolkit.formatted_textr*<00>prompt_toolkit.input.baser+<00>prompt_toolkit.input.typeaheadr,r-<00>3prompt_toolkit.key_binding.bindings.page_navigationr.<00>#prompt_toolkit.key_binding.defaultsr/<00>&prompt_toolkit.key_binding.emacs_stater0<00>'prompt_toolkit.key_binding.key_bindingsr1r2r3r4r5r6r7<00>(prompt_toolkit.key_binding.key_processorr8r9<00>#prompt_toolkit.key_binding.vi_stater:<00>prompt_toolkit.keysr;<00> prompt_toolkit.layout.containersr<r=<00>prompt_toolkit.layout.controlsr>r?<00>prompt_toolkit.layout.dummyr@<00>prompt_toolkit.layout.layoutrArB<00>prompt_toolkit.outputrCrD<00>prompt_toolkit.rendererrErF<00>prompt_toolkit.searchrG<00>prompt_toolkit.stylesrHrIrJrKrLrMrNrO<00>prompt_toolkit.utilsrPrQ<00>currentrRrSrUrT<00>__all__r<5F>rW<00>ApplicationEventHandlerr<72><00> _SIGWINCHrZrVr<>r<>rWrsr|r<>r~<00><module>rst<00><01>"<22><0E><12> <09> <09> <0A>
<EFBFBD><10> <0B><02><02>1<><1C><1F> <02> <02> <02> <02>)<29>,<2C>A<>U<>/<2F>,<2C><02><02> @<01>M<>M<>:<3A>+<2B>I<><02>B<01>=<3D><02><02><02>Q<01>7<>$<24>><3E>C<>;<3B>5<>4<>B<>-<2D> <02> <02> <02>7<>-<2D>9<><12> <02><07>
<12><01> <14>\<5C> "<22>
<EFBFBD>"<22>$=<3D>#><3E><04>#D<>E<><17> <13>F<EFBFBD>J<EFBFBD><04> -<2D> <09> <12>6<EFBFBD>9<EFBFBD>d<EFBFBD> +<2B><08>e<12>'<27>*<2A>%<25>e<12>P)]H<01><0F>]H<01>@ <0A>:<10>)<0E><10>)<0E>X<10>"<<3C><10>"<r<>