Files
intellecton/venv/lib/python3.12/site-packages/idna/__pycache__/cli.cpython-312.pyc
T

43 lines
5.7 KiB
Plaintext
Raw Normal View History

Ë
j+ãó,dZddlZddlZddlmZddlmZddlmZm Z ddl
m Z m Z m
Z
ddlmZmZdd lmZd
ed efd Zd ej,fd
Zdeed eefdZdededed efdZdde eed efdZedk(rej<e««yy)z{Command-line interface for the :mod:`idna` package.
Invoked via ``python -m idna``. See :func:`main` for the entry point.
éN)ÚIterable)Úchain)ÚIOÚOptionalé)Ú IDNAErrorÚdecodeÚencode)Ú_alabel_prefixÚ_unicode_dots_re)Ú __version__Úreturncó|tjd«Štˆfdtj|«D««S)zBReturn True if any label in ``s`` carries the ``xn--`` ACE prefix.Úasciic3ó\K|]#}|j«j«Œ%y­w©N)ÚlowerÚ
startswith)Ú.0ÚlabelÚprefixs €úK/home/antigravity/intellecton/venv/lib/python3.12/site-packages/idna/cli.pyú <genexpr>z%_looks_like_alabel.<locals>.<genexpr>s"øèø€ÒW°Eˆu{‰{}××Wùsƒ),)r r Úanyr Úsplit)rrs @rÚ_looks_like_alabelrs1ø€ä
×
" 
+€FÜ ÓWÔ=M×=SÑ=SÐTUÓ=VÔ có6tjdd¬«}|j«}|jdddddd ¬
«|jd d ddd
d¬
«|jddd¬«|jdddt¬«|jddd¬«|S)Nzpython -m idnauÒConvert a domain name between its Unicode (U-label) and ASCII-compatible (A-label) forms. With no mode flag, the direction is chosen from the first input — if it contains an xn-- label the stream is decoded, otherwise it is encoded — and the same mode is applied to every remaining input. UTS #46 mapping is applied by default; pass --strict to disable it. When no domains are given on the command line and stdin is piped, one domain per line is read from stdin.)ÚprogÚ descriptionz-ez--encodeÚmodeÚ store_constr
z+Encode the input to its ASCII A-label form.)ÚdestÚactionÚconstÚhelpz-dz--decoder z-Decode the input from its ASCII A-label form.z--strictÚ
store_truezGDisable the default UTS #46 mapping and apply IDNA 2008 rules verbatim.)r%r'z --versionÚversionzidna )r%r)ÚdomainÚ*z=One or more domain names to convert. Omit to read from stdin.)Únargsr')ÚargparseÚArgumentParserÚadd_mutually_exclusive_groupÚ add_argumentr
)Úparserr"s rÚ
_build_parserr2Ü
×
ð
ô
€Fð × 0€DØ×ÑØ ØØ
ØØØ
ôð ×ÑØ ØØ
ØØØ
ôð ×ÑØØØ
ôð
 ×ÑØØØœ ôð
 ×ÑØØØ
ôð
€MrÚstreamc#óHK|D]}|j«}|sŒ|Œy­w)z@Yield non-empty stripped lines from ``stream``, ignoring blanks.N)Ústrip)r3ÚlineÚstrippeds rÚ _iter_stdinr8Is(èø€àòˆØ—:‘:“<ˆÚ Øùs""r*r"Úuts46c óþ |dk(rtt||¬««y
tt||¬«jd«« y
#t$r.}td|d|d|tj
¬«Yd}~y d}~wwxYw) zEConvert ``domain`` and write the result; return ``False`` on failure.r )r9rzidna: z failed for z: )ÚfileNFT)Úprintr r
rÚsysÚstderr)r*r"r9Úerrs rÚ _convert_oner@QszðØ  Ü ”&˜  ô