Files
proxmox/venv/lib/python3.12/site-packages/click/__pycache__/utils.cpython-312.pyc

265 lines
24 KiB
Plaintext
Raw Normal View History

<EFBFBD>
<0C>Hi!O<00><01><><00>ddlmZddlmZddlZddlZddlZddlZ ddl
m Z ddl m Z ddl mZddlmZddlmZdd lmZdd
lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZe j8rddlZej>d<12>Z e jBd<13>Z"d(d<14>Z#d)d<15>Z$d*d<16>Z%d+d,d<17>Z&Gd<18>d<19>Z'Gd<1A>d<1B>Z( d- d.d<1D>Z)d/d<1E>Z* d0 d1d<1F>Z+ d2 d3d <20>Z, d4 d5d!<21>Z-d6d7d"<22>Z.Gd#<23>d$<24>Z/ d8 d9d%<25>Z0dddd&<26> d:d'<27>Z1y);<3B>)<01> annotationsN<73><01>update_wrapper)<01>
ModuleType)<01> TracebackType<70>)<01>_default_text_stderr)<01>_default_text_stdout)<01>_find_binary_writer)<01>auto_wrap_for_ansi)<01>binary_streams)<01> open_stream)<01>should_strip_ansi)<01>
strip_ansi)<01> text_streams)<01>WIN)<01>resolve_color_default<6C>P<>Rc<01>\<00>dj|j<00><00>j<00>S)N<>-)<03>join<69>split<69>lower)<01>names <20>M/home/intlc/projects/proxmox/venv/lib/python3.12/site-packages/click/utils.py<70> _posixifyr s <00><00> <0E>8<EFBFBD>8<EFBFBD>D<EFBFBD>J<EFBFBD>J<EFBFBD>L<EFBFBD> !<21> '<27> '<27> )<29>)<29>c<01>(<00><00>d<02>fd<01> }t|<01><00>S)z0Wraps a function so that it swallows exceptions.c<01>4<00><01> <00>|i|<01><01>S#t$rYywxYw<01>N)<01> Exception)<03>args<67>kwargs<67>funcs <20>r<00>wrapperzsafecall.<locals>.wrapper's-<00><><00> <11><17><14>(<28><16>(<28> (<28><><18> <11> <10><13> <11>s <00> <00> <03>)r#zP.argsr$zP.kwargs<67>returnzR | Noner)r%r&s` r<00>safecallr($s<00><><00><14> <1A>'<27>4<EFBFBD> (<28>(rc<01><><00>t|t<00>r$ |jtj<00><00>St |<00>S#t
$r|jdd<02>cYSwxYw)z%Converts a value into a valid string.<2E>utf-8<>replace)<07>
isinstance<EFBFBD>bytes<65>decode<64>sys<79>getfilesystemencoding<6E> UnicodeError<6F>str)<01>values r<00>make_strr41sW<00><00><11>%<25><15><1F> 4<><18><<3C><<3C><03> 9<> 9<> ;<3B><<3C> <<3C> <0F>u<EFBFBD>:<3A><15><><1C> 4<><18><<3C><<3C><07><19>3<> 3<> 4<>s<00>"A<00>A<03>Ac<01><00>|jd<01>}|dk7r|d|}|j<00>}|sy|ddk(r|dd}d}t|<03>dz
}t|<03>D]N\}}|t|<07>|dkDzz }||kDrnA|ddk(rd j |d|dz<00>cS||k(s<01>H||k7s<01>Nnd j |<03>S|td
<EFBFBD>z }|dkDr(|t||<00>|dkDzz}||krn |dz}|dkDr<01>(d j |d|<00>d
zS) z+Returns a condensed version of help string.z
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>r<00>r<00>.<2E> z...)<05>findr<00>len<65> enumerater)<08>help<6C>
max_length<EFBFBD> paragraph_end<6E>words<64> total_length<74>
last_index<EFBFBD>i<>words r<00>make_default_short_helprF;sP<00><00><19>I<EFBFBD>I<EFBFBD>f<EFBFBD>%<25>M<EFBFBD><14><02><1A><13>N<EFBFBD>]<5D>#<23><04> <11>J<EFBFBD>J<EFBFBD>L<EFBFBD>E<EFBFBD> <10><11> <0A>Q<EFBFBD>x<EFBFBD>4<EFBFBD><17><15>a<EFBFBD>b<EFBFBD> <09><05><14>L<EFBFBD><14>U<EFBFBD><1A>a<EFBFBD><1E>J<EFBFBD><1C>U<EFBFBD>#<23> <1F><07><01>4<EFBFBD><14><03>D<EFBFBD> <09>Q<EFBFBD><11>U<EFBFBD>+<2B>+<2B> <0C> <17>*<2A> $<24> <11> <0F><02>8<EFBFBD>s<EFBFBD>?<3F><16>8<EFBFBD>8<EFBFBD>E<EFBFBD>'<27>A<EFBFBD><01>E<EFBFBD>N<EFBFBD>+<2B> +<2B> <17>:<3A> %<25>!<21>z<EFBFBD>/<2F> <11> <1F><13>x<EFBFBD>x<EFBFBD><05><EFBFBD><1E><11>C<EFBFBD><05>J<EFBFBD><1E>L<EFBFBD> <0C>a<EFBFBD>%<25><14><03>E<EFBFBD>!<21>H<EFBFBD> <0A><11>Q<EFBFBD><15>/<2F>/<2F> <0C> <17>:<3A> %<25> <11> <09>Q<EFBFBD><06><01> <0C>a<EFBFBD>%<25> <0F>8<EFBFBD>8<EFBFBD>E<EFBFBD>"<22>1<EFBFBD>I<EFBFBD> <1E><15> &<26>&rc<01><><00>eZdZdZ d d d<03>Zdd<04>Zdd<05>Zdd<06>Zdd<07>Zdd<08>Z dd <09>Z
dd
<EFBFBD>Z dd <0B>Z y)<15>LazyFilez<65>A lazy file works like a regular file but it does not fully open
the file but it does perform some basic checks early to see if the
filename parameter does make sense. This is useful for safely opening
files for writing.
Nc<01>&<00>tj|<01>|_||_||_||_||_|||jdk(rt||||<04>\|_|_ yd|vrt||<02>j<00>d|_d|_ y)Nr<00>rT) <0C>os<6F>fspathr<00>mode<64>encoding<6E>errors<72>atomicr<00>_f<5F> should_close<73>open<65>close)<06>self<6C>filenamerMrNrOrPs r<00>__init__zLazyFile.__init__ts<><00><00><1C><19><19>8<EFBFBD>,<2C><04> <09><18><04> <09> <20><04> <0A><1C><04> <0B><1C><04> <0B> <0C> <0C> <0F>9<EFBFBD>9<EFBFBD><03> <1B>)4<>X<EFBFBD>t<EFBFBD>X<EFBFBD>v<EFBFBD>)V<> &<26>D<EFBFBD>G<EFBFBD>T<EFBFBD>&<26><12>d<EFBFBD>{<7B><15>X<EFBFBD>t<EFBFBD>$<24>*<2A>*<2A>,<2C><1A>D<EFBFBD>G<EFBFBD> $<24>D<EFBFBD> rc<01>6<00>t|j<00>|<01>Sr!)<02>getattrrS<00>rUrs r<00> __getattr__zLazyFile.__getattr__<5F>s<00><00><16>t<EFBFBD>y<EFBFBD>y<EFBFBD>{<7B>D<EFBFBD>)<29>)rc<01><><00>|j<00>t|j<00>Sdt|j<00><00>d|j<00>d<03>S)Nz<unopened file 'z' <20>>)rQ<00>repr<70>format_filenamerrM<00>rUs r<00>__repr__zLazyFile.__repr__<5F>s=<00><00> <0F>7<EFBFBD>7<EFBFBD> <1E><17><04><07><07>=<3D> <20>!<21>/<2F>$<24>)<29>)<29>"<<3C>!=<3D>R<EFBFBD><04> <09> <09>{<7B>!<21>L<>Lrc<01>F<00>|j<00> |jS t|j|j|j|j
|j <00><02>\}|_||_|S#t$r*}ddl m
}||j|j<00><05>|<02>d}~wwxYw)z<>Opens the file if it's not yet open. This call might fail with
a :exc:`FileError`. Not handling this error will produce an error
that Click shows.
N<>rPr)<01> FileError)<01>hint) rQrrrMrNrOrPrR<00>OSError<6F>
exceptionsrd<00>strerror)rU<00>rv<72>erds rrSz LazyFile.open<65>s<><00><00>
<10>7<EFBFBD>7<EFBFBD> <1E><17>7<EFBFBD>7<EFBFBD>N<EFBFBD> ?<3F>$/<2F><14> <09> <09>4<EFBFBD>9<EFBFBD>9<EFBFBD>d<EFBFBD>m<EFBFBD>m<EFBFBD>T<EFBFBD>[<5B>[<5B><14><1B><1B>%<0E> !<21>B<EFBFBD><04>!<21><15><04><07><11> <09><> <17> ?<3F> -<2D><1B>D<EFBFBD>I<EFBFBD>I<EFBFBD>A<EFBFBD>J<EFBFBD>J<EFBFBD>7<>Q<EFBFBD> ><3E><> ?<3F>s<00>A
A-<00>- B <03>6%B<03>B c<01>R<00>|j<00>|jj<00>yy)z+Closes the underlying file, no matter what.N)rQrTr`s rrTzLazyFile.close<73>s<00><00> <0F>7<EFBFBD>7<EFBFBD> <1E> <10>G<EFBFBD>G<EFBFBD>M<EFBFBD>M<EFBFBD>O<EFBFBD> rc<01>><00>|jr|j<00>yy)z<>This function only closes the file if it was opened by the lazy
file wrapper. For instance this will never close stdin.
N)rRrTr`s r<00>close_intelligentlyzLazyFile.close_intelligently<6C>s<00><00> <10> <1C> <1C> <10>J<EFBFBD>J<EFBFBD>L<EFBFBD> rc<01><00>|Sr!<00>r`s r<00> __enter__zLazyFile.__enter__<5F><00><00><00><13> rc<01>$<00>|j<00>yr!)rm<00>rU<00>exc_type<70> exc_value<75>tbs r<00>__exit__zLazyFile.__exit__<5F>s<00><00> <0A> <20> <20>"rc<01>L<00>|j<00>t|j<00>Sr!)rS<00>iterrQr`s r<00>__iter__zLazyFile.__iter__<5F>s<00><00> <0C> <09> <09> <0B><13>D<EFBFBD>G<EFBFBD>G<EFBFBD>}<7D>r)rJN<>strictF)
rV<00>str | os.PathLike[str]rMr2rN<00>
str | NonerOr}rP<00>bool<6F>rr2r'<00>t.Any<6E>r'r2)r'<00> t.IO[t.Any]<5D>r'<00>None)r'rH<00>rtztype[BaseException] | NoneruzBaseException | NonervzTracebackType | Noner'r<><00>r'zcabc.Iterator[t.AnyStr]) <0A>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rWr[rarSrTrmrprwrzrorrrHrHms<><00><00><08><18>#<23>%<25><1C> %<25>(<28>%<25><12>%<25><1D> %<25>
<1B> %<25> <15> %<25>6*<2A>M<01>
<12>$<1C>
<19><14>#<23>,<2C>#<23>(<28>#<23> !<21> #<23>
<0E> #<23>rrHc<01>L<00>eZdZdd<01>Zd d<02>Zd
d<03>Z d d<04>Zd d<05>Zd d<06>Zy)<0E> KeepOpenFilec<01><00>||_yr!)<01>_file)rU<00>files rrWzKeepOpenFile.__init__<5F>s <00><00>"&<26><04>
rc<01>.<00>t|j|<01>Sr!)rYr<>rZs rr[zKeepOpenFile.__getattr__<5F>s<00><00><16>t<EFBFBD>z<EFBFBD>z<EFBFBD>4<EFBFBD>(<28>(rc<01><00>|Sr!ror`s rrpzKeepOpenFile.__enter__<5F>rqrc<01><00>yr!rorss rrwzKeepOpenFile.__exit__<5F>s<00><00> rc<01>,<00>t|j<00>Sr!)r^r<>r`s rrazKeepOpenFile.__repr__<5F><00><00><00><13>D<EFBFBD>J<EFBFBD>J<EFBFBD><1F>rc<01>,<00>t|j<00>Sr!)ryr<>r`s rrzzKeepOpenFile.__iter__<5F>r<>rN)r<>r<>r'r<>r)r'r<>r<>r<>r<>) r<>r<>r<>rWr[rprwrarzrorrr<>r<><00>sF<00><00>'<27>)<29><14> <0A>,<2C> <0A>(<28> <0A> !<21>  <0A>
<0E>  <0A> <20> rr<>Tc<01>|<00>|<01>|r t<00>}n
t<00>}|<01>y|<00>'t|ttt
f<03>s t|<00>}n|}|r!|xsd}t|t<00>r|dz }n|dz }|s|j <00>yt|tt
f<02>r?t|<01>}|<06>{|j <00>|j|<05>|j <00>yt|<04>}t||<04>r t|<05>}n&tr t<00> t||<04>}n |s t|<05>}|j|<05>|j <00>y)aPrint a message and newline to stdout or a file. This should be
used instead of :func:`print` because it provides better support
for different data, files, and environments.
Compared to :func:`print`, this does the following:
- Ensures that the output encoding is not misconfigured on Linux.
- Supports Unicode in the Windows console.
- Supports writing to binary outputs, and supports writing bytes
to text outputs.
- Supports colors and styles on Windows.
- Removes ANSI color and style codes if the output does not look
like an interactive terminal.
- Always flushes the output.
:param message: The string or bytes to output. Other objects are
converted to strings.
:param file: The file to write to. Defaults to ``stdout``.
:param err: Write to ``stderr`` instead of ``stdout``.
:param nl: Print a newline after the message. Enabled by default.
:param color: Force showing or hiding colors and other styles. By
default Click will remove color if the output does not look like
an interactive terminal.
.. versionchanged:: 6.0
Support Unicode output on the Windows console. Click does not
modify ``sys.stdout``, so ``sys.stdout.write()`` and ``print()``
will still not support Unicode.
.. versionchanged:: 4.0
Added the ``color`` parameter.
.. versionadded:: 3.0
Added the ``err`` parameter.
.. versionchanged:: 2.0
Support colors on Windows if colorama is installed.
Nr7<00>
<EFBFBD>
)r r
r,r2r-<00> bytearray<61>flushr <00>writerrrrr )<07>messager<65><00>nl<6E>err<72>color<6F>out<75> binary_files r<00>echor<6F><00>s<00><00>Z <0C>|<7C> <0E>'<27>)<29>D<EFBFBD>'<27>)<29>D<EFBFBD> <10><<3C> <12><0F><1A>:<3A>g<EFBFBD><03>U<EFBFBD>I<EFBFBD>7N<37>#O<>.1<EFBFBD>'<27>l<EFBFBD><03><15><03> <09><11>i<EFBFBD>R<EFBFBD><03> <15>c<EFBFBD>3<EFBFBD> <1F> <0F>4<EFBFBD>K<EFBFBD>C<EFBFBD> <0F>5<EFBFBD>L<EFBFBD>C<EFBFBD> <0E> <0C>
<EFBFBD>
<EFBFBD> <0C><0E> <12>#<23><05>y<EFBFBD>)<29>*<2A>)<29>$<24>/<2F> <0B> <16> "<22> <10>J<EFBFBD>J<EFBFBD>L<EFBFBD> <17> <1D> <1D>c<EFBFBD> "<22> <17> <1D> <1D> <1F> <12>
&<26>e<EFBFBD>,<2C><05> <1C>T<EFBFBD>5<EFBFBD> )<29><1C>S<EFBFBD>/<2F>C<EFBFBD> <10>!<21>-<2D>)<29>$<24><05>6<><04><1A> <20><13>o<EFBFBD><03><08>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD><08>J<EFBFBD>J<EFBFBD>Lrc<01>\<00>tj|<00>}|<01>td|<00>d<02><03><00>|<01>S)z<>Returns a system stream for byte processing.
:param name: the name of the stream to open. Valid names are ``'stdin'``,
``'stdout'`` and ``'stderr'``
<20>Unknown standard stream '<27>')r <00>get<65> TypeError)r<00>openers r<00>get_binary_streamr<6D>Es5<00><00> <1C> <1F> <1F><04> %<25>F<EFBFBD> <0A>~<7E><17>3<>D<EFBFBD>6<EFBFBD><11>;<3B><<3C><<3C> <11>8<EFBFBD>Orc<01>`<00>tj|<00>}|<03>td|<00>d<02><03><00>|||<02>S)a<>Returns a system stream for text processing. This usually returns
a wrapped stream around a binary stream returned from
:func:`get_binary_stream` but it also can take shortcuts for already
correctly configured streams.
:param name: the name of the stream to open. Valid names are ``'stdin'``,
``'stdout'`` and ``'stderr'``
:param encoding: overrides the detected default encoding.
:param errors: overrides the default error mode.
r<>r<>)rr<>r<>)rrNrOr<>s r<00>get_text_streamr<6D>Qs;<00><00><1A> <1D> <1D>d<EFBFBD> #<23>F<EFBFBD> <0A>~<7E><17>3<>D<EFBFBD>6<EFBFBD><11>;<3B><<3C><<3C> <11>(<28>F<EFBFBD> #<23>#rc
<01><><00>|r$tjdt|||||<05><02><00>St|||||<05><02>\}}|stjdt |<06><00>}|S)a^Open a file, with extra behavior to handle ``'-'`` to indicate
a standard stream, lazy open on write, and atomic write. Similar to
the behavior of the :class:`~click.File` param type.
If ``'-'`` is given to open ``stdout`` or ``stdin``, the stream is
wrapped so that using it in a context manager will not close it.
This makes it possible to use the function without accidentally
closing a standard stream:
.. code-block:: python
with open_file(filename) as f:
...
:param filename: The name or Path of the file to open, or ``'-'`` for
``stdin``/``stdout``.
:param mode: The mode in which to open the file.
:param encoding: The encoding to decode or encode a file opened in
text mode.
:param errors: The error handling mode.
:param lazy: Wait to open the file until it is accessed. For read
mode, the file is temporarily opened to raise access errors
early, then closed until it is read again.
:param atomic: Write to a temporary file and replace the given file
on close.
.. versionadded:: 3.0
r<>rc)<05>t<>castrHrr<>)rVrMrNrO<00>lazyrP<00>frRs r<00> open_filer<65>fs_<00><00>H <0C><10>v<EFBFBD>v<EFBFBD> <19>8<EFBFBD>H<EFBFBD>d<EFBFBD>H<EFBFBD>f<EFBFBD>V<EFBFBD>T<>
<EFBFBD>
<EFBFBD>"<22>(<28>D<EFBFBD>(<28>F<EFBFBD>6<EFBFBD>R<>O<EFBFBD>A<EFBFBD>|<7C> <17> <0A>F<EFBFBD>F<EFBFBD>=<3D>,<2C>q<EFBFBD>/<2F> 2<><01> <0C>Hrc<01>$<00>|r tjj|<00>}ntj|<00>}t |t
<00>r&|j tj<00>d<01>}|S|jdd<03>j dd<01>}|S)u<>Format a filename as a string for display. Ensures the filename can be
displayed by replacing any invalid bytes or surrogate escapes in the name
with the replacement character ``<60>``.
Invalid bytes or surrogate escapes will raise an error when written to a
stream with ``errors="strict"``. This will typically happen with ``stdout``
when the locale is something like ``en_GB.UTF-8``.
Many scenarios *are* safe to write surrogates though, due to PEP 538 and
PEP 540, including:
- Writing to ``stderr``, which uses ``errors="backslashreplace"``.
- The system has ``LANG=C.UTF-8``, ``C``, or ``POSIX``. Python opens
stdout and stderr with ``errors="surrogateescape"``.
- None of ``LANG/LC_*`` are set. Python assumes ``LANG=C.UTF-8``.
- Python is started in UTF-8 mode with ``PYTHONUTF8=1`` or ``-X utf8``.
Python opens stdout and stderr with ``errors="surrogateescape"``.
:param filename: formats a filename for UI display. This will also convert
the filename into unicode without failing.
:param shorten: this optionally shortens the filename to strip of the
path that leads up to it.
r+r*<00>surrogateescape)
rK<00>path<74>basenamerLr,r-r.r/r0<00>encode)rV<00>shortens rr_r_<00>s}<00><00>6<0F><15>7<EFBFBD>7<EFBFBD>#<23>#<23>H<EFBFBD>-<2D><08><15>9<EFBFBD>9<EFBFBD>X<EFBFBD>&<26><08><11>(<28>E<EFBFBD>"<22><1B>?<3F>?<3F>3<EFBFBD>#<<3C>#<<3C>#><3E> <09>J<><08> <14>O<EFBFBD> <1C>?<3F>?<3F>7<EFBFBD>,=<3D>><3E>E<>E<> <13>Y<EFBFBD>
<EFBFBD><08> <14>Orc<01><><00>trf|rdnd}tjj|<03>}|<04>tjj d<03>}tjj ||<00>S|rHtjj tjj dt|<00><00><00><02><00>Stjdk(r=tjj tjj d<06>|<00>Stjj tjjdtjj d<08><00>t|<00><00>S) a<>Returns the config folder for the application. The default behavior
is to return whatever is most appropriate for the operating system.
To give you an idea, for an app called ``"Foo Bar"``, something like
the following folders could be returned:
Mac OS X:
``~/Library/Application Support/Foo Bar``
Mac OS X (POSIX):
``~/.foo-bar``
Unix:
``~/.config/foo-bar``
Unix (POSIX):
``~/.foo-bar``
Windows (roaming):
``C:\Users\<user>\AppData\Roaming\Foo Bar``
Windows (not roaming):
``C:\Users\<user>\AppData\Local\Foo Bar``
.. versionadded:: 2.0
:param app_name: the application name. This should be properly capitalized
and can contain whitespace.
:param roaming: controls if the folder should be roaming or not on Windows.
Has no effect otherwise.
:param force_posix: if this is set to `True` then on any POSIX system the
folder will be stored in the home folder with a leading
dot instead of the XDG config home or darwin's
application support folder.
<20>APPDATA<54> LOCALAPPDATA<54>~z~/.<2E>darwinz~/Library/Application Support<72>XDG_CONFIG_HOMEz ~/.config)
rrK<00>environr<6E>r<><00>
expanduserrrr/<00>platform)<05>app_name<6D>roaming<6E> force_posix<69>key<65>folders r<00> get_app_dirr<72><00>s<><00><00>> <0B>"<22>i<EFBFBD><0E><03><13><1A><1A><1E><1E><03>$<24><06> <11>><3E><17>W<EFBFBD>W<EFBFBD>'<27>'<27><03>,<2C>F<EFBFBD><11>w<EFBFBD>w<EFBFBD>|<7C>|<7C>F<EFBFBD>H<EFBFBD>-<2D>-<2D><12><11>w<EFBFBD>w<EFBFBD>|<7C>|<7C>B<EFBFBD>G<EFBFBD>G<EFBFBD>.<2E>.<2E><13>Y<EFBFBD>x<EFBFBD>5H<35>4I<34>/J<>K<>L<>L<>
<EFBFBD>|<7C>|<7C>x<EFBFBD><1F><11>w<EFBFBD>w<EFBFBD>|<7C>|<7C> <0E>G<EFBFBD>G<EFBFBD> <1E> <1E>><3E> ?<3F><18>
<EFBFBD>
<EFBFBD> <0E>7<EFBFBD>7<EFBFBD><<3C><<3C>
<EFBFBD>
<EFBFBD>
<EFBFBD><0E><0E>(<28>"<22>'<27>'<27>*<<3C>*<<3C>[<5B>*I<>J<><11>(<28><1B> <06>rc<01>(<00>eZdZdZdd<02>Zdd<03>Zdd<04>Zy) <09>PacifyFlushWrappera<72>This wrapper is used to catch and suppress BrokenPipeErrors resulting
from ``.flush()`` being called on broken pipe during the shutdown/final-GC
of the Python interpreter. Notably ``.flush()`` is always called on
``sys.stdout`` and ``sys.stderr``. So as to have minimal impact on any
other cleanup code, and the case where the underlying file is not a broken
pipe, all calls and attributes are proxied.
c<01><00>||_yr!)<01>wrapped)rUr<>s rrWzPacifyFlushWrapper.__init__<5F>s <00><00><1E><04> rc<01><><00> |jj<00>y#t$r(}ddl}|j|jk7r<01>Yd}~yd}~wwxYw)Nr)r<>r<>rf<00>errno<6E>EPIPE)rUrjr<>s rr<>zPacifyFlushWrapper.flush<73>sB<00><00> <16> <10>L<EFBFBD>L<EFBFBD> <1E> <1E> <20><><16> <16> <18><10>w<EFBFBD>w<EFBFBD>%<25>+<2B>+<2B>%<25><15>&<26><> <16>s<00><00> A<03>A <03> Ac<01>.<00>t|j|<01>Sr!)rYr<>)rU<00>attrs rr[zPacifyFlushWrapper.__getattr__s<00><00><16>t<EFBFBD>|<7C>|<7C>T<EFBFBD>*<2A>*rN)r<>r<>r'r<>r<>)r<>r2r'r<>)r<>r<>r<>r<>rWr<>r[rorrr<>r<><00>s<00><00><08><1F><16>+rr<>c<01>~<00>|<01>tjd}|stjd}t|dd<01>dvsctj
dk(ro|j dk(r`tjj|<00>sAtjj|<00>d<08><02>rtjj|<00>Stjt|j <00>}tjjtjj|<00><00>d}|dk7r|<02>d |<03><00>}d
|jd <09><00><00>S) a:Determine the command used to run the program, for use in help
text. If a file or entry point was executed, the file name is
returned. If ``python -m`` was used to execute a module or package,
``python -m name`` is returned.
This doesn't try to be too precise, the goal is to give a concise
name for help text. Files are only shown as their name without the
path. ``python`` is only shown for modules, and the full path to
``sys.executable`` is not shown.
:param path: The Python file being executed. Python puts this in
``sys.argv[0]``, which is used by default.
:param _main: The ``__main__`` module. This should only be passed
during internal testing.
.. versionadded:: 8.0
Based on command args detection in the Werkzeug reloader.
:meta private:
N<>__main__r<00> __package__>Nr7<00>ntr7z.exer9z
python -m )r/<00>modules<65>argvrYrKrr<>r<><00>existsr<73>r<>r<>r2<00>splitext<78>lstrip)r<><00>_main<69> py_modulers r<00>_detect_program_namer<65> s<00><00>. <0A>}<7D><13> <0B> <0B>J<EFBFBD>'<27><05> <0F><12>x<EFBFBD>x<EFBFBD><01>{<7B><04> <0F>u<EFBFBD>m<EFBFBD>T<EFBFBD>*<2A>j<EFBFBD>8<>
<EFBFBD><07><07>4<EFBFBD><0F> <11> <1D> <1D><12> #<23><12><07><07><0E><0E>t<EFBFBD>$<24> <0E>G<EFBFBD>G<EFBFBD>N<EFBFBD>N<EFBFBD>d<EFBFBD>V<EFBFBD>4<EFBFBD>=<3D> )<29><12>w<EFBFBD>w<EFBFBD><1F><1F><04>%<25>%<25>
<12><06><06>s<EFBFBD>E<EFBFBD>-<2D>-<2D>.<2E>I<EFBFBD> <0A>7<EFBFBD>7<EFBFBD> <1B> <1B>B<EFBFBD>G<EFBFBD>G<EFBFBD>,<2C>,<2C>T<EFBFBD>2<> 3<>A<EFBFBD> 6<>D<EFBFBD> <0C>z<EFBFBD><19> <20>k<EFBFBD><11>4<EFBFBD>&<26>)<29> <09> <17> <09>(<28>(<28><13>-<2D>.<2E> /<2F>/r)<03>user<65>env<6E>glob_recursivec<01>><00>ddlm}g}|D]t}|rtjj|<06>}|rtjj |<06>} |||<03><03>}|s|j|<06><00>d|j|<07><00>v|S#t
j $rg}Y<00>@wxYw)a<>Simulate Unix shell expansion with Python functions.
See :func:`glob.glob`, :func:`os.path.expanduser`, and
:func:`os.path.expandvars`.
This is intended for use on Windows, where the shell does not do any
expansion. It may not exactly match what a Unix shell would do.
:param args: List of command line arguments to expand.
:param user: Expand user home directory.
:param env: Expand environment variables.
:param glob_recursive: ``**`` matches directories recursively.
.. versionchanged:: 8.1
Invalid glob patterns are treated as empty expansions rather
than raising an error.
.. versionadded:: 8.0
:meta private:
r)<01>glob)<01> recursive) r<>rKr<>r<><00>
expandvars<EFBFBD>re<72>error<6F>append<6E>extend)r#r<>r<>r<>r<>r<><00>arg<72>matchess r<00> _expand_argsr<73>Bs<><00><00>8<1A>
<0C>C<EFBFBD><13> <20><03> <0F><14>'<27>'<27>$<24>$<24>S<EFBFBD>)<29>C<EFBFBD> <0E><14>'<27>'<27>$<24>$<24>S<EFBFBD>)<29>C<EFBFBD> <19><1A>3<EFBFBD>.<2E>9<>G<EFBFBD><17> <0F>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD> <0F>J<EFBFBD>J<EFBFBD>w<EFBFBD> <1F> <20>" <0F>J<EFBFBD><4A><12>x<EFBFBD>x<EFBFBD> <19><18>G<EFBFBD> <19>s<00>
B<02>B<05>B)rr2r'r2)r%zt.Callable[P, R]r'zt.Callable[P, R | None])r3r<>r'r2)<01>-)r>r2r?<00>intr'r2)NNTFN) r<>z t.Any | Noner<65>zt.IO[t.Any] | Noner<65>r~r<>r~r<>z bool | Noner'r<>)r<00>&t.Literal['stdin', 'stdout', 'stderr']r'z
t.BinaryIO)Nr{)rr<>rNr}rOr}r'zt.TextIO)rJNr{FF)rVr|rMr2rNr}rOr}r<>r~rPr~r'r<>)F)rVz3str | bytes | os.PathLike[str] | os.PathLike[bytes]r<>r~r'r2)TF)r<>r2r<>r~r<>r~r'r2)NN)r<>r}r<>zModuleType | Noner'r2)
r#zcabc.Iterable[str]r<>r~r<>r~r<>r~r'z list[str])2<>
__future__r<00>collections.abc<62>abc<62>cabcrKr<>r/<00>typingr<67><00> functoolsr<00>typesrr<00>_compatr r
r r r rrrrr<00>globalsr<00> TYPE_CHECKING<4E>typing_extensions<6E>te<74> ParamSpecr<00>TypeVarrrr(r4rFrHr<>r<>r<>r<>r<>r_r<>r<>r<>r<>rorr<00><module>r<>s<00><01>"<22><1E> <09> <09>
<EFBFBD><12>$<24><1C><1F>)<29>)<29>(<28>'<27>#<23> <20>&<26><1F>!<21><18>*<2A><04>?<3F>?<3F>"<22><14><02> <0C> <0C>S<EFBFBD><19>A<EFBFBD> <0A>A<EFBFBD>I<EFBFBD>I<EFBFBD>c<EFBFBD>N<EFBFBD><01>*<2A>
)<29><16>/'<27>dU<1D>U<1D>p <20> <20>4!<21>#<23><13><15><1D> d<11> <19>d<11>
<1C>d<11> <0A>d<11>
<0E> d<11>
<17> d<11> 
<EFBFBD> d<11>N <14> <20>!<21>$<24>
0<EFBFBD>$<24><18>$<24> <17>$<24><0E> $<24>.<14><1F>!<21><16><18> . <0A>$<24>. <0A>
<0A>. <0A><19>. <0A> <17> . <0A>
<0F> . <0A> <11> . <0A><11>. <0A>f<1A>'<14>A<>'<14> <11>'<14> <09>'<14>T.<06>b+<2B>+<2B>49=<3D>40<>
<14>40<>$5<>40<><08>40<>t<16><14><1F> 1<0F>
<1C>1<0F> <0F>1<0F>
<0E> 1<0F>
<19> 1<0F> <0F> 1r