Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/METADATAAdded+479
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/RECORDAdded+105
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/WHEELAdded+4
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/licenses/LICENSEAdded+19
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/__init__.pyAdded+177
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/__main__.pyAdded+245
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_emoji_codes.pyAdded
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_emoji_replace.pyAdded+31
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_export_format.pyAdded+76
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_extension.pyAdded+10
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_fileno.pyAdded+24
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_inspect.pyAdded+272
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_log_render.pyAdded+94
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_loop.pyAdded+43
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_null_file.pyAdded+69
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_palettes.pyAdded+309
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_pick.pyAdded+17
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_ratio.pyAdded+153
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_spinners.pyAdded+482
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_stack.pyAdded+16
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_timer.pyAdded+19
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/__init__.pyAdded+93
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/_versions.pyAdded+23
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode10-0-0.pyAdded+611
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode11-0-0.pyAdded+625
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode12-0-0.pyAdded+637
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode12-1-0.pyAdded+636
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode13-0-0.pyAdded+648
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode14-0-0.pyAdded+661
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode15-0-0.pyAdded+671
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode15-1-0.pyAdded+670
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode16-0-0.pyAdded+683
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode17-0-0.pyAdded+691
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode4-1-0.pyAdded+425
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode5-0-0.pyAdded+430
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode5-1-0.pyAdded+433
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode5-2-0.pyAdded+461
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-0-0.pyAdded+469
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-1-0.pyAdded+480
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-2-0.pyAdded+480
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-3-0.pyAdded+481
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode7-0-0.pyAdded+507
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode8-0-0.pyAdded+515
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode9-0-0.pyAdded+598
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_win32_console.pyAdded+661
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_windows.pyAdded+71
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_windows_renderer.pyAdded+56
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_wrap.pyAdded+93
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/abc.pyAdded+33
- .cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/align.pyAdded+320
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479Metadata-Version: 2.4Name: richVersion: 15.0.0Summary: Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminalLicense: MITLicense-File: LICENSEAuthor: Will McGuganAuthor-email: willmcgugan@gmail.comRequires-Python: >=3.9.0Classifier: Development Status :: 5 - Production/StableClassifier: Environment :: ConsoleClassifier: Framework :: IPythonClassifier: Intended Audience :: DevelopersClassifier: License :: OSI Approved :: MIT LicenseClassifier: Operating System :: MacOSClassifier: Operating System :: Microsoft :: WindowsClassifier: Operating System :: POSIX :: LinuxClassifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.9Classifier: Programming Language :: Python :: 3.10Classifier: Programming Language :: Python :: 3.11Classifier: Programming Language :: Python :: 3.12Classifier: Programming Language :: Python :: 3.13Classifier: Programming Language :: Python :: 3.14Classifier: Typing :: TypedProvides-Extra: jupyterRequires-Dist: ipywidgets (>=7.5.1,<9) ; extra == "jupyter"Requires-Dist: markdown-it-py (>=2.2.0)Requires-Dist: pygments (>=2.13.0,<3.0.0)Project-URL: Documentation, https://rich.readthedocs.io/en/latest/Project-URL: Homepage, https://github.com/Textualize/richDescription-Content-Type: text/markdown
[](https://pypi.org/project/rich/) [](https://badge.fury.io/py/rich)
[](https://pepy.tech/project/rich)[](https://codecov.io/gh/Textualize/rich)[](https://www.willmcgugan.com/tag/rich/)[](https://twitter.com/willmcgugan)

[English readme](https://github.com/textualize/rich/blob/master/README.md) • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) • [Indonesian readme](https://github.com/textualize/rich/blob/master/README.id.md) • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) • [Polskie readme](https://github.com/textualize/rich/blob/master/README.pl.md)
Rich is a Python library for _rich_ text and beautiful formatting in the terminal.
The [Rich API](https://rich.readthedocs.io/en/latest/) makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box.

For a video introduction to Rich see [calmcode.io](https://calmcode.io/rich/introduction.html) by [@fishnets88](https://twitter.com/fishnets88).
See what [people are saying about Rich](https://www.willmcgugan.com/blog/pages/post/rich-tweets/).
## Compatibility
Rich works with Linux, macOS and Windows. True color / emoji works with new Windows Terminal, classic terminal is limited to 16 colors. Rich requires Python 3.8 or later.
Rich works with [Jupyter notebooks](https://jupyter.org/) with no additional configuration required.
## Installing
Install with `pip` or your favorite PyPI package manager.
```shpython -m pip install rich```
Run the following to test Rich output on your terminal:
```shpython -m rich```
## Rich Print
To effortlessly add rich output to your application, you can import the [rich print](https://rich.readthedocs.io/en/latest/introduction.html#quick-start) method, which has the same signature as the builtin Python function. Try this:
```pythonfrom rich import print
print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals())```

## Rich REPL
Rich can be installed in the Python REPL, so that any data structures will be pretty printed and highlighted.
```python>>> from rich import pretty>>> pretty.install()```

## Using the Console
For more control over rich terminal content, import and construct a [Console](https://rich.readthedocs.io/en/latest/reference/console.html#rich.console.Console) object.
```pythonfrom rich.console import Console
console = Console()```
The Console object has a `print` method which has an intentionally similar interface to the builtin `print` function. Here's an example of use:
```pythonconsole.print("Hello", "World!")```
As you might expect, this will print `"Hello World!"` to the terminal. Note that unlike the builtin `print` function, Rich will word-wrap your text to fit within the terminal width.
There are a few ways of adding color and style to your output. You can set a style for the entire output by adding a `style` keyword argument. Here's an example:
```pythonconsole.print("Hello", "World!", style="bold red")```
The output will be something like the following:

That's fine for styling a line of text at a time. For more finely grained styling, Rich renders a special markup which is similar in syntax to [bbcode](https://en.wikipedia.org/wiki/BBCode). Here's an example:
```pythonconsole.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].")```

You can use a Console object to generate sophisticated output with minimal effort. See the [Console API](https://rich.readthedocs.io/en/latest/console.html) docs for details.
## Rich Inspect
Rich has an [inspect](https://rich.readthedocs.io/en/latest/reference/init.html?highlight=inspect#rich.inspect) function which can produce a report on any Python object, such as class, instance, or builtin.
```python>>> my_list = ["foo", "bar"]>>> from rich import inspect>>> inspect(my_list, methods=True)```

See the [inspect docs](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) for details.
# Rich Library
Rich contains a number of builtin _renderables_ you can use to create elegant output in your CLI and help you debug your code.
Click the following headings for details:
<details><summary>Log</summary>
The Console object has a `log()` method which has a similar interface to `print()`, but also renders a column for the current time and the file and line which made the call. By default Rich will do syntax highlighting for Python structures and for repr strings. If you log a collection (i.e. a dict or a list) Rich will pretty print it so that it fits in the available space. Here's an example of some of these features.
```pythonfrom rich.console import Consoleconsole = Console()
test_data = [ {"jsonrpc": "2.0", "method": "sum", "params": [None, 1, 2, 4, False, True], "id": "1",}, {"jsonrpc": "2.0", "method": "notify_hello", "params": [7]}, {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": "2"},]
def test_log(): enabled = False context = { "foo": "bar", } movies = ["Deadpool", "Rise of the Skywalker"] console.log("Hello from", console, "!") console.log(test_data, log_locals=True)
test_log()```
The above produces the following output:

Note the `log_locals` argument, which outputs a table containing the local variables where the log method was called.
The log method could be used for logging to the terminal for long running applications such as servers, but is also a very nice debugging aid.
</details><details><summary>Logging Handler</summary>
You can also use the builtin [Handler class](https://rich.readthedocs.io/en/latest/logging.html) to format and colorize output from Python's logging module. Here's an example of the output:

</details>
<details><summary>Emoji</summary>
To insert an emoji in to console output place the name between two colons. Here's an example:
```python>>> console.print(":smiley: :vampire: :pile_of_poo: :thumbs_up: :raccoon:")😃 🧛 💩 👍 🦝```
Please use this feature wisely.
</details>
<details><summary>Tables</summary>
Rich can render flexible [tables](https://rich.readthedocs.io/en/latest/tables.html) with unicode box characters. There is a large variety of formatting options for borders, styles, cell alignment etc.

The animation above was generated with [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) in the examples directory.
Here's a simpler table example:
```pythonfrom rich.console import Consolefrom rich.table import Table
console = Console()
table = Table(show_header=True, header_style="bold magenta")table.add_column("Date", style="dim", width=12)table.add_column("Title")table.add_column("Production Budget", justify="right")table.add_column("Box Office", justify="right")table.add_row( "Dec 20, 2019", "Star Wars: The Rise of Skywalker", "$275,000,000", "$375,126,118")table.add_row( "May 25, 2018", "[red]Solo[/red]: A Star Wars Story", "$275,000,000", "$393,151,347",)table.add_row( "Dec 15, 2017", "Star Wars Ep. VIII: The Last Jedi", "$262,000,000", "[bold]$1,332,539,889[/bold]",)
console.print(table)```
This produces the following output:

Note that console markup is rendered in the same way as `print()` and `log()`. In fact, anything that is renderable by Rich may be included in the headers / rows (even other tables).
The `Table` class is smart enough to resize columns to fit the available width of the terminal, wrapping text as required. Here's the same example, with the terminal made smaller than the table above:

</details>
<details><summary>Progress Bars</summary>
Rich can render multiple flicker-free [progress](https://rich.readthedocs.io/en/latest/progress.html) bars to track long-running tasks.
For basic usage, wrap any sequence in the `track` function and iterate over the result. Here's an example:
```pythonfrom rich.progress import track
for step in track(range(100)): do_step(step)```
It's not much harder to add multiple progress bars. Here's an example taken from the docs:

The columns may be configured to show any details you want. Built-in columns include percentage complete, file size, file speed, and time remaining. Here's another example showing a download in progress:

To try this out yourself, see [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) which can download multiple URLs simultaneously while displaying progress.
</details>
<details><summary>Status</summary>
For situations where it is hard to calculate progress, you can use the [status](https://rich.readthedocs.io/en/latest/reference/console.html#rich.console.Console.status) method which will display a 'spinner' animation and message. The animation won't prevent you from using the console as normal. Here's an example:
```pythonfrom time import sleepfrom rich.console import Console
console = Console()tasks = [f"task {n}" for n in range(1, 11)]
with console.status("[bold green]Working on tasks...") as status: while tasks: task = tasks.pop(0) sleep(1) console.log(f"{task} complete")```
This generates the following output in the terminal.

The spinner animations were borrowed from [cli-spinners](https://www.npmjs.com/package/cli-spinners). You can select a spinner by specifying the `spinner` parameter. Run the following command to see the available values:
```python -m rich.spinner```
The above command generates the following output in the terminal:

</details>
<details><summary>Tree</summary>
Rich can render a [tree](https://rich.readthedocs.io/en/latest/tree.html) with guide lines. A tree is ideal for displaying a file structure, or any other hierarchical data.
The labels of the tree can be simple text or anything else Rich can render. Run the following for a demonstration:
```python -m rich.tree```
This generates the following output:

See the [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) example for a script that displays a tree view of any directory, similar to the linux `tree` command.
</details>
<details><summary>Columns</summary>
Rich can render content in neat [columns](https://rich.readthedocs.io/en/latest/columns.html) with equal or optimal width. Here's a very basic clone of the (MacOS / Linux) `ls` command which displays a directory listing in columns:
```pythonimport osimport sys
from rich import printfrom rich.columns import Columns
directory = os.listdir(sys.argv[1])print(Columns(directory))```
The following screenshot is the output from the [columns example](https://github.com/textualize/rich/blob/master/examples/columns.py) which displays data pulled from an API in columns:

</details>
<details><summary>Markdown</summary>
Rich can render [markdown](https://rich.readthedocs.io/en/latest/markdown.html) and does a reasonable job of translating the formatting to the terminal.
To render markdown import the `Markdown` class and construct it with a string containing markdown code. Then print it to the console. Here's an example:
```pythonfrom rich.console import Consolefrom rich.markdown import Markdown
console = Console()with open("README.md") as readme: markdown = Markdown(readme.read())console.print(markdown)```
This will produce output something like the following:

</details>
<details><summary>Syntax Highlighting</summary>
Rich uses the [pygments](https://pygments.org/) library to implement [syntax highlighting](https://rich.readthedocs.io/en/latest/syntax.html). Usage is similar to rendering markdown; construct a `Syntax` object and print it to the console. Here's an example:
```pythonfrom rich.console import Consolefrom rich.syntax import Syntax
my_code = '''def iter_first_last(values: Iterable[T]) -> Iterable[Tuple[bool, bool, T]]: """Iterate and generate a tuple with a flag for first and last value.""" iter_values = iter(values) try: previous_value = next(iter_values) except StopIteration: return first = True for value in iter_values: yield first, False, previous_value first = False previous_value = value yield first, True, previous_value'''syntax = Syntax(my_code, "python", theme="monokai", line_numbers=True)console = Console()console.print(syntax)```
This will produce the following output:

</details>
<details><summary>Tracebacks</summary>
Rich can render [beautiful tracebacks](https://rich.readthedocs.io/en/latest/traceback.html) which are easier to read and show more code than standard Python tracebacks. You can set Rich as the default traceback handler so all uncaught exceptions will be rendered by Rich.
Here's what it looks like on OSX (similar on Linux):

</details>
All Rich renderables make use of the [Console Protocol](https://rich.readthedocs.io/en/latest/protocol.html), which you can also use to implement your own Rich content.
# Rich CLI
See also [Rich CLI](https://github.com/textualize/rich-cli) for a command line application powered by Rich. Syntax highlight code, render markdown, display CSVs in tables, and more, directly from the command prompt.

# Textual
See also Rich's sister project, [Textual](https://github.com/Textualize/textual), which you can use to build sophisticated User Interfaces in the terminal.

# Toad
[Toad](https://github.com/batrachianai/toad) is a unified interface for agentic coding. Built with Rich and Textual.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105rich/__init__.py,sha256=j7AA9_z_PANQbmRTwTkWZc_DVdqtBBHxBqGrMsz21CI,6131rich/__main__.py,sha256=kcy8BtBEUkYLCogRkwhCdJs0VNx6KF1n8kFU2g-7plg,7725rich/_emoji_codes.py,sha256=hu1VL9nbVdppJrVoijVshRlcRRe_v3dju3Mmd2sKZdY,140235rich/_emoji_replace.py,sha256=ysSn8smSqQW22XEfCH0lJ80vogUYZKr9dPImfUG2e6Y,1067rich/_export_format.py,sha256=RI08pSrm5tBSzPMvnbTqbD9WIalaOoN5d4M1RTmLq1Y,2128rich/_extension.py,sha256=G66PkbH_QdTJh6jD-J228O76CmAnr2hLQv72CgPPuzE,241rich/_fileno.py,sha256=HWZxP5C2ajMbHryvAQZseflVfQoGzsKOHzKGsLD8ynQ,799rich/_inspect.py,sha256=5pUYCqveN4ekb_mgHOYCipyZCrMGEJZYZs3y5QqmCf0,9894rich/_log_render.py,sha256=xBKCxqiO4FZk8eG56f8crFdrmJxFrJsQE3V3F-fFekc,3213rich/_loop.py,sha256=hV_6CLdoPm0va22Wpw4zKqM0RYsz3TZxXj0PoS-9eDQ,1236rich/_null_file.py,sha256=ADGKp1yt-k70FMKV6tnqCqecB-rSJzp-WQsD7LPL-kg,1394rich/_palettes.py,sha256=cdev1JQKZ0JvlguV9ipHgznTdnvlIzUFDBb0It2PzjI,7063rich/_pick.py,sha256=evDt8QN4lF5CiwrUIXlOJCntitBCOsI3ZLPEIAVRLJU,423rich/_ratio.py,sha256=IOtl78sQCYZsmHyxhe45krkb68u9xVz7zFsXVJD-b2Y,5325rich/_spinners.py,sha256=U2r1_g_1zSjsjiUdAESc2iAMc3i4ri_S8PYP6kQ5z1I,19919rich/_stack.py,sha256=-C8OK7rxn3sIUdVwxZBBpeHhIzX0eI-VM3MemYfaXm0,351rich/_timer.py,sha256=zelxbT6oPFZnNrwWPpc1ktUeAT-Vc4fuFcRZLQGLtMI,417rich/_unicode_data/__init__.py,sha256=40PhAFp3b88yPnRtTG6i9g5xj-5w98CET3C4Ip1LJAI,2631rich/_unicode_data/_versions.py,sha256=ftILR3G5dqmlQmCJYNovuyXfFneJY2eH2RvpV19tyYE,298rich/_unicode_data/unicode10-0-0.py,sha256=FUstYPZwDF15BEuAERqXHqIPvC1KY1SL20qLj999Fzo,14496rich/_unicode_data/unicode11-0-0.py,sha256=jp8SRKFBlIaHMafxAfhLiU7FizwdcgPVvytR3kSFtZo,14874rich/_unicode_data/unicode12-0-0.py,sha256=0XHXSjW5EXue6Qfgl_u0bK7NstiSdmqrR_F_Wqhs5bE,15216rich/_unicode_data/unicode12-1-0.py,sha256=kWcRGh1UVwsmK9qflfGsO_aM8AuNhLthJcsyXAOQryI,15189rich/_unicode_data/unicode13-0-0.py,sha256=DokduALtgaB-WvapW7X7PmM3kZFbgnCo9ifINWZtuDs,15519rich/_unicode_data/unicode14-0-0.py,sha256=Ni-3JnGf5sB4kGl8ip-Iyqoum-awJjZV0RoSNuo0yu8,15884rich/_unicode_data/unicode15-0-0.py,sha256=DBHkV5Si9vmtv_MiW6NmPQb8yUeP4N-9hNt2juZr4ZE,16156rich/_unicode_data/unicode15-1-0.py,sha256=uyCZLYrg0q7wGt3-uBdsF0Ay_x8MTMvFqK6aMOkl9rA,16129rich/_unicode_data/unicode16-0-0.py,sha256=5iGpbczVQ7BD2QGYb6k1h_OdILQXXuhcvI6dQFLKbMc,16480rich/_unicode_data/unicode17-0-0.py,sha256=NXbjFsAaTYdj6TYgk5Q9disv40LZHbedFGRl_48_9Y0,16704rich/_unicode_data/unicode4-1-0.py,sha256=yIApQGEG7VOFYY2FFfvOdPprE6VpDusjLlTlCy4G_Rw,9488rich/_unicode_data/unicode5-0-0.py,sha256=PkEI1x4RGwXSmgqHiu88jyz14VQT8bWiOtBDrECaVZg,9613rich/_unicode_data/unicode5-1-0.py,sha256=C0-PWziqpkVkf3PkPz2GWNwidCrjef5AHQGBpqTPkuY,9650rich/_unicode_data/unicode5-2-0.py,sha256=gM88qri3_9b0I37DGK1-ah-0SUed2VmvxUddB5UZLto,10390rich/_unicode_data/unicode6-0-0.py,sha256=hhcAipqKU81dZ4YbDXIlT7KEK9yNG_Lx-5GLgNTF75g,10604rich/_unicode_data/unicode6-1-0.py,sha256=PtUJYxwtU5S2A44YY_69Ka_wTkq-c7QCa-yibmkHvJs,10899rich/_unicode_data/unicode6-2-0.py,sha256=TdTOctGwO-OYVGif1DoRJvsaQISHw5EXHPt58fjB55g,10899rich/_unicode_data/unicode6-3-0.py,sha256=G9l8chu2MJTwZ_d_0tmH7PBg8KYYHaeuJCJNCHGHkDc,10924rich/_unicode_data/unicode7-0-0.py,sha256=po9GGYW7ilGU9MwGE6fny-OofqbDwelQrnOIm-IusjI,11630rich/_unicode_data/unicode8-0-0.py,sha256=4PjyI-w2Uj9xtanNlZm1d_2khcetMQlIefaoU2joGkY,11864rich/_unicode_data/unicode9-0-0.py,sha256=A-pQjvkTICUGXEDOiWNMqa6z6vv1E__HJffzu7zLi9c,14148rich/_win32_console.py,sha256=o2QN_IRx10biGP3Ap1neaqX8FBGlUKSmWM6Kw4OSg-U,22719rich/_windows.py,sha256=is3WpbHMj8WaTHYB11hc6lP2t4hlvt4TViTlHSmjsi0,1901rich/_windows_renderer.py,sha256=d799xOnxLbCCCzGu9-U7YLmIQkxtxQIBFQQ6iu4veSc,2759rich/_wrap.py,sha256=FlSsom5EX0LVkA3KWy34yHnCfLtqX-ZIepXKh-70rpc,3404rich/abc.py,sha256=dALMOGfKVNeAbvqq66IpTQxQUerxD7AE4FKwqd0eQKk,878rich/align.py,sha256=a8MbP-iJjoOFonxqgoP3YketKMWU3WFZaxjqAv2Qc5E,10726rich/ansi.py,sha256=TQ7pdksq0b3XPcw_tSGvL_QthPxNLKOYQImPQYWp6pM,6947rich/bar.py,sha256=ldbVHOzKJOnflVNuv1xS7g6dLX2E3wMnXkdPbpzJTcs,3263rich/box.py,sha256=SSolg8_pzHzY9QvJQo-qp0tbPsnj8O_2W4hmi1l-Zo0,10650rich/cells.py,sha256=fPRSnquYlCO4THgmUokOJOhNlcx8C4NZ2Xv9JM_7GbE,12335rich/color.py,sha256=3HSULVDj7qQkXUdFWv78JOiSZzfy5y1nkcYhna296V0,18211rich/color_triplet.py,sha256=3lhQkdJbvWPoLDO-AnYImAWmJvV5dlgYNCVZ97ORaN4,1054rich/columns.py,sha256=HUX0KcMm9dsKNi11fTbiM_h2iDtl8ySCaVcxlalEzq8,7131rich/console.py,sha256=RTP8ZpY2I6KiFEe1Adb1H4z-5-FHdReAk6Xm62HcE1o,101361rich/constrain.py,sha256=1VIPuC8AgtKWrcncQrjBdYqA3JVWysu6jZo1rrh7c7Q,1288rich/containers.py,sha256=c_56TxcedGYqDepHBMTuZdUIijitAQgnox-Qde0Z1qo,5502rich/control.py,sha256=HnsraFTzBaUQDzKJWXsfPv-PPmgGypSgSv7oANackqs,6475rich/default_styles.py,sha256=DqEUiGrj4N0eAcgDwjGeUSe8BLMxZw57L9RXnTCroTs,8401rich/diagnose.py,sha256=1RWnQoppPXjC_49AB4vtV048DK3ksQSq671C83Y6f-g,977rich/emoji.py,sha256=z7ABu0_61WJPWOM_dxhUHNaA0B6RQuZX3reljs1iWE8,2388rich/errors.py,sha256=5pP3Kc5d4QJ_c0KFsxrfyhjiPVe7J1zOqSFbFAzcV-Y,642rich/file_proxy.py,sha256=MvlB3tSsuVmH4qCWXK9SK3S_OohVRIczUw_Fufmsdt8,1750rich/filesize.py,sha256=_iz9lIpRgvW7MNSeCZnLg-HwzbP4GETg543WqD8SFs0,2484rich/highlighter.py,sha256=MIapWwjR8ahUcsDicgN4xLRbanbh5x_Qzh5kfdDrKKk,9729rich/json.py,sha256=omC2WHTgURxEosna1ftoSJCne2EX7MDuQtCdswS3qsk,5019rich/jupyter.py,sha256=G9pOJmR4ESIFYSd4MKGqmHqCtstx0oRWpyeTgv54-Xc,3228rich/layout.py,sha256=WR8PCSroYnteIT3zawxQ3k3ad1sQO5wGG1SZOoeBuBM,13944rich/live.py,sha256=UKvqLSuSzNHIBz5pxRrU7SPsnG48vJJx2TMHiaHlmnI,15317rich/live_render.py,sha256=jQO3X_p2wemGI2bdCAY_e5j9xXNTwDxuujbpoSRsH6c,3803rich/logging.py,sha256=7vhk7r_LhWTcwteyjLLM5Nfc839fwBuIiISvBZcGwzo,12622rich/markdown.py,sha256=MmbNh8IhWgdGNQkeNTHWNR470KQVACt_9aJu6TMourA,26549rich/markup.py,sha256=btpr271BLhiCR1jNglRnv2BpIzVcNefYwSMeW9teDbc,8427rich/measure.py,sha256=HmrIJX8sWRTHbgh8MxEay_83VkqNW_70s8aKP5ZcYI8,5305rich/padding.py,sha256=h8XnIivLrNtlxI3vQPKHXh4hAwjOJqZx0slM0z3g1_M,4896rich/pager.py,sha256=SO_ETBFKbg3n_AgOzXm41Sv36YxXAyI3_R-KOY2_uSc,828rich/palette.py,sha256=Ar6ZUrYHiFt6-Rr2k-k9F8V7hxgJYHNdqjk2vVXsLgc,3288rich/panel.py,sha256=9sQl00hPIqH5G2gALQo4NepFwpP0k9wT-s_gOms5pIc,11157rich/pretty.py,sha256=lxW_bhBfDTKe-grtzP1KQhQsqPZxfZN14th4JRVoLzQ,36349rich/progress.py,sha256=Z6Yz6pYO26LFXx24cXKvk2bEX6FkjK2Z5e2fy0Bt78s,60393rich/progress_bar.py,sha256=mZTPpJUwcfcdgQCTTz3kyY-fc79ddLwtx6Ghhxfo064,8162rich/prompt.py,sha256=1SIuBEelovvwCG2wp22PZwskA3IkmAsOxf0ruFkOhOk,12448rich/protocol.py,sha256=9OHzfZXAnidZqaZgSFsX5KsJg8JHHNUc8jk9dsxa1ik,1348rich/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0rich/region.py,sha256=rNT9xZrVZTYIXZC0NYn41CJQwYNbR-KecPOxTgQvB8Y,166rich/repr.py,sha256=mFexGTVledesZiMD3jBBBBoICoWh-XPFAUq3Hu7iX4U,4436rich/rule.py,sha256=umO21Wjw0FcYAeTB3UumNLCsDWhejzxnjlf2VwiXiDI,4590rich/scope.py,sha256=x-jkKIE-j7ZxA9I07lya5iVAuDAyUKM58HWtNZQUzRc,3239rich/screen.py,sha256=rL_j2wX-4SeuIOI2oOlc418QP9EAvD59GInUmEAE6jQ,1579rich/segment.py,sha256=17JAw4bmsV_LrJ8PnhI9XH2DaN-fOEPF-8mgx7joLDM,25740rich/spinner.py,sha256=onIhpKlljRHppTZasxO8kXgtYyCHUkpSgKglRJ3o51g,4214rich/status.py,sha256=kkPph3YeAZBo-X-4wPp8gTqZyU466NLwZBA4PZTTewo,4424rich/style.py,sha256=yp4TsNKNPUxBytoFWfy7kzE2Gh_9TYA7fs2ULXfbm00,27068rich/styled.py,sha256=wljVsVTXbABMMZvkzkO43ZEk_-irzEtvUiQ-sNnikQ8,1234rich/syntax.py,sha256=ytgeGUt91fdr8LaHKOdkaNMewrPRxgoci5mMd3MPE4I,36305rich/table.py,sha256=6yv7wMLXZgOsGgzEDpKXpecXQOwcLBHNOn-MYcbo1Zk,40033rich/terminal_theme.py,sha256=1j5-ufJfnvlAo5Qsi_ACZiXDmwMXzqgmFByObT9-yJY,3370rich/text.py,sha256=t2J8iMquwR0BUUggm-cVNp30Wxw5M8fIF_p0jioYRV0,47655rich/theme.py,sha256=biYZWd_Wu1KW8VtT7UsTQDrDU89RxAK5_Vz1y3ztGYI,3780rich/themes.py,sha256=0xgTLozfabebYtcJtDdC5QkX5IVUEaviqDUJJh4YVFk,102rich/traceback.py,sha256=TT03eLKEj5XapXFp9kgf0bBwNupIFrHquKxZtwBhz_8,37535rich/tree.py,sha256=QoOwg424FkdwGfR8K0tZ6Q7qtzWNAUP_m4sFaYuG6nw,9391rich-15.0.0.dist-info/METADATA,sha256=-tNPxgP6xEgb-B-N1ilJL8MCwOwxkJyGZEdRUSr7Ljs,18445rich-15.0.0.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88rich-15.0.0.dist-info/licenses/LICENSE,sha256=3u18F6QxgVgZCj6iOcyHmlpQJxzruYrnAl9I--WNyhU,1056rich-15.0.0.dist-info/RECORD,,1234Wheel-Version: 1.0Generator: poetry-core 2.3.1Root-Is-Purelib: trueTag: py3-none-any12345678910111213141516171819Copyright (c) 2020 Will McGugan
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177"""Rich text and beautiful formatting in the terminal."""
import osfrom typing import IO, TYPE_CHECKING, Any, Callable, Optional, Union
from ._extension import load_ipython_extension # noqa: F401
__all__ = ["get_console", "reconfigure", "print", "inspect", "print_json"]
if TYPE_CHECKING: from .console import Console
# Global console used by alternative print_console: Optional["Console"] = None
try: _IMPORT_CWD = os.path.abspath(os.getcwd())except FileNotFoundError: # Can happen if the cwd has been deleted _IMPORT_CWD = ""
def get_console() -> "Console": """Get a global :class:`~rich.console.Console` instance. This function is used when Rich requires a Console, and hasn't been explicitly given one.
Returns: Console: A console instance. """ global _console if _console is None: from .console import Console
_console = Console()
return _console
def reconfigure(*args: Any, **kwargs: Any) -> None: """Reconfigures the global console by replacing it with another.
Args: *args (Any): Positional arguments for the replacement :class:`~rich.console.Console`. **kwargs (Any): Keyword arguments for the replacement :class:`~rich.console.Console`. """ from rich.console import Console
new_console = Console(*args, **kwargs) _console = get_console() _console.__dict__ = new_console.__dict__
def print( *objects: Any, sep: str = " ", end: str = "\n", file: Optional[IO[str]] = None, flush: bool = False,) -> None: r"""Print object(s) supplied via positional arguments. This function has an identical signature to the built-in print. For more advanced features, see the :class:`~rich.console.Console` class.
Args: sep (str, optional): Separator between printed objects. Defaults to " ". end (str, optional): Character to write at end of output. Defaults to "\\n". file (IO[str], optional): File to write to, or None for stdout. Defaults to None. flush (bool, optional): Has no effect as Rich always flushes output. Defaults to False.
""" from .console import Console
write_console = get_console() if file is None else Console(file=file) return write_console.print(*objects, sep=sep, end=end)
def print_json( json: Optional[str] = None, *, data: Any = None, indent: Union[None, int, str] = 2, highlight: bool = True, skip_keys: bool = False, ensure_ascii: bool = False, check_circular: bool = True, allow_nan: bool = True, default: Optional[Callable[[Any], Any]] = None, sort_keys: bool = False,) -> None: """Pretty prints JSON. Output will be valid JSON.
Args: json (str): A string containing JSON. data (Any): If json is not supplied, then encode this data. indent (int, optional): Number of spaces to indent. Defaults to 2. highlight (bool, optional): Enable highlighting of output: Defaults to True. skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False. ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False. check_circular (bool, optional): Check for circular references. Defaults to True. allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True. default (Callable, optional): A callable that converts values that can not be encoded in to something that can be JSON encoded. Defaults to None. sort_keys (bool, optional): Sort dictionary keys. Defaults to False. """
get_console().print_json( json, data=data, indent=indent, highlight=highlight, skip_keys=skip_keys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, default=default, sort_keys=sort_keys, )
def inspect( obj: Any, *, console: Optional["Console"] = None, title: Optional[str] = None, help: bool = False, methods: bool = False, docs: bool = True, private: bool = False, dunder: bool = False, sort: bool = True, all: bool = False, value: bool = True,) -> None: """Inspect any Python object.
* inspect(<OBJECT>) to see summarized info. * inspect(<OBJECT>, methods=True) to see methods. * inspect(<OBJECT>, help=True) to see full (non-abbreviated) help. * inspect(<OBJECT>, private=True) to see private attributes (single underscore). * inspect(<OBJECT>, dunder=True) to see attributes beginning with double underscore. * inspect(<OBJECT>, all=True) to see all attributes.
Args: obj (Any): An object to inspect. title (str, optional): Title to display over inspect result, or None use type. Defaults to None. help (bool, optional): Show full help text rather than just first paragraph. Defaults to False. methods (bool, optional): Enable inspection of callables. Defaults to False. docs (bool, optional): Also render doc strings. Defaults to True. private (bool, optional): Show private attributes (beginning with underscore). Defaults to False. dunder (bool, optional): Show attributes starting with double underscore. Defaults to False. sort (bool, optional): Sort attributes alphabetically, callables at the top, leading and trailing underscores ignored. Defaults to True. all (bool, optional): Show all attributes. Defaults to False. value (bool, optional): Pretty print value. Defaults to True. """ _console = console or get_console() from rich._inspect import Inspect
# Special case for inspect(inspect) is_inspect = obj is inspect
_inspect = Inspect( obj, title=title, help=is_inspect or help, methods=is_inspect or methods, docs=is_inspect or docs, private=private, dunder=dunder, sort=sort, all=all, value=value, ) _console.print(_inspect)
if __name__ == "__main__": # pragma: no cover print("Hello, **World**")123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245import colorsysimport iofrom time import process_time
from rich import boxfrom rich.color import Colorfrom rich.console import Console, ConsoleOptions, Group, RenderableType, RenderResultfrom rich.markdown import Markdownfrom rich.measure import Measurementfrom rich.pretty import Prettyfrom rich.segment import Segmentfrom rich.style import Stylefrom rich.syntax import Syntaxfrom rich.table import Tablefrom rich.text import Text
class ColorBox: def __rich_console__( self, console: Console, options: ConsoleOptions ) -> RenderResult: for y in range(0, 5): for x in range(options.max_width): h = x / options.max_width l = 0.1 + ((y / 5) * 0.7) r1, g1, b1 = colorsys.hls_to_rgb(h, l, 1.0) r2, g2, b2 = colorsys.hls_to_rgb(h, l + 0.7 / 10, 1.0) bgcolor = Color.from_rgb(r1 * 255, g1 * 255, b1 * 255) color = Color.from_rgb(r2 * 255, g2 * 255, b2 * 255) yield Segment("▄", Style(color=color, bgcolor=bgcolor)) yield Segment.line()
def __rich_measure__( self, console: "Console", options: ConsoleOptions ) -> Measurement: return Measurement(1, options.max_width)
def make_test_card() -> Table: """Get a renderable that demonstrates a number of features.""" table = Table.grid(padding=1, pad_edge=True) table.title = "Rich features" table.add_column("Feature", no_wrap=True, justify="center", style="bold red") table.add_column("Demonstration")
color_table = Table( box=None, expand=False, show_header=False, show_edge=False, pad_edge=False, ) color_table.add_row( ( "✓ [bold green]4-bit color[/]\n" "✓ [bold blue]8-bit color[/]\n" "✓ [bold magenta]Truecolor (16.7 million)[/]\n" "✓ [bold yellow]Dumb terminals[/]\n" "✓ [bold cyan]Automatic color conversion" ), ColorBox(), )
table.add_row("Colors", color_table)
table.add_row( "Styles", "All ansi styles: [bold]bold[/], [dim]dim[/], [italic]italic[/italic], [underline]underline[/], [strike]strikethrough[/], [reverse]reverse[/], and even [blink]blink[/].", )
lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque in metus sed sapien ultricies pretium a at justo. Maecenas luctus velit et auctor maximus." lorem_table = Table.grid(padding=1, collapse_padding=True) lorem_table.pad_edge = False lorem_table.add_row( Text(lorem, justify="left", style="green"), Text(lorem, justify="center", style="yellow"), Text(lorem, justify="right", style="blue"), Text(lorem, justify="full", style="red"), ) table.add_row( "Text", Group( Text.from_markup( """Word wrap text. Justify [green]left[/], [yellow]center[/], [blue]right[/] or [red]full[/].\n""" ), lorem_table, ), )
def comparison(renderable1: RenderableType, renderable2: RenderableType) -> Table: table = Table(show_header=False, pad_edge=False, box=None, expand=True) table.add_column("1", ratio=1) table.add_column("2", ratio=1) table.add_row(renderable1, renderable2) return table
table.add_row( "Asian\nlanguage\nsupport", ":flag_for_china: 该库支持中文,日文和韩文文本!\n:flag_for_japan: ライブラリは中国語、日本語、韓国語のテキストをサポートしています\n:flag_for_south_korea: 이 라이브러리는 중국어, 일본어 및 한국어 텍스트를 지원합니다", )
markup_example = ( "[bold magenta]Rich[/] supports a simple [i]bbcode[/i]-like [b]markup[/b] for [yellow]color[/], [underline]style[/], and emoji! " ":+1: :apple: :ant: :bear: :baguette_bread: :bus: " ) table.add_row("Markup", markup_example)
example_table = Table( show_edge=False, show_header=True, expand=False, row_styles=["none", "dim"], box=box.SIMPLE, ) example_table.add_column("[green]Date", style="green", no_wrap=True) example_table.add_column("[blue]Title", style="blue") example_table.add_column( "[cyan]Production Budget", style="cyan", justify="right", no_wrap=True, ) example_table.add_column( "[magenta]Box Office", style="magenta", justify="right", no_wrap=True, ) example_table.add_row( "Dec 20, 2019", "Star Wars: The Rise of Skywalker", "$275,000,000", "$375,126,118", ) example_table.add_row( "May 25, 2018", "[b]Solo[/]: A Star Wars Story", "$275,000,000", "$393,151,347", ) example_table.add_row( "Dec 15, 2017", "Star Wars Ep. VIII: The Last Jedi", "$262,000,000", "[bold]$1,332,539,889[/bold]", ) example_table.add_row( "May 19, 1999", "Star Wars Ep. [b]I[/b]: [i]The phantom Menace", "$115,000,000", "$1,027,044,677", )
table.add_row("Tables", example_table)
code = '''\def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: """Iterate and generate a tuple with a flag for last value.""" iter_values = iter(values) try: previous_value = next(iter_values) except StopIteration: return for value in iter_values: yield False, previous_value previous_value = value yield True, previous_value'''
pretty_data = { "foo": [ 3.1427, ( "Paul Atreides", "Vladimir Harkonnen", "Thufir Hawat", ), ], "atomic": (False, True, None), } table.add_row( "Syntax\nhighlighting\n&\npretty\nprinting", comparison( Syntax(code, "python3", line_numbers=True, indent_guides=True), Pretty(pretty_data, indent_guides=True), ), )
markdown_example = """\# Markdown
Supports much of the *markdown* __syntax__!
- Headers- Basic formatting: **bold**, *italic*, `code`- Block quotes- Lists, and more... """ table.add_row( "Markdown", comparison("[cyan]" + markdown_example, Markdown(markdown_example)) )
table.add_row( "+more!", """Progress bars, columns, styled logging handler, tracebacks, etc...""", ) return table
if __name__ == "__main__": # pragma: no cover from rich.panel import Panel
console = Console( file=io.StringIO(), force_terminal=True, ) test_card = make_test_card()
# Print once to warm cache start = process_time() console.print(test_card) pre_cache_taken = round((process_time() - start) * 1000.0, 1)
console.file = io.StringIO()
start = process_time() console.print(test_card) taken = round((process_time() - start) * 1000.0, 1)
c = Console(record=True) c.print(test_card)
console = Console() console.print(f"[dim]rendered in [not dim]{pre_cache_taken}ms[/] (cold cache)") console.print(f"[dim]rendered in [not dim]{taken}ms[/] (warm cache)") console.print() console.print( Panel( "[b magenta]Hope you enjoy using Rich![/]\n\n" "Consider sponsoring to ensure this project is maintained.\n\n" "[cyan]https://github.com/sponsors/willmcgugan[/cyan]", border_style="green", title="Help ensure Rich is maintained", padding=(1, 2), ) )12345678910111213141516171819202122232425262728293031import refrom typing import Callable, Match, Optional
_ReStringMatch = Match[str] # regex match object_ReSubCallable = Callable[[_ReStringMatch], str] # Callable invoked by re.sub_EmojiSubMethod = Callable[[_ReSubCallable, str], str] # Sub method of a compiled re
def _emoji_replace( text: str, default_variant: Optional[str] = None, _emoji_sub: _EmojiSubMethod = re.compile(r"(:(\S*?)(?:(?:\-)(emoji|text))?:)").sub,) -> str: """Replace emoji code in text.""" from ._emoji_codes import EMOJI
get_emoji = EMOJI.__getitem__ variants = {"text": "\ufe0e", "emoji": "\ufe0f"} get_variant = variants.get default_variant_code = variants.get(default_variant, "") if default_variant else ""
def do_replace(match: Match[str]) -> str: emoji_code, emoji_name, variant = match.groups() try: return get_emoji(emoji_name.lower()) + get_variant( variant, default_variant_code ) except KeyError: return emoji_code
return _emoji_sub(do_replace, text)12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576CONSOLE_HTML_FORMAT = """\<!DOCTYPE html><html><head><meta charset="UTF-8"><style>{stylesheet}body {{ color: {foreground}; background-color: {background};}}</style></head><body> <pre style="font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><code style="font-family:inherit">{code}</code></pre></body></html>"""
CONSOLE_SVG_FORMAT = """\<svg class="rich-terminal" viewBox="0 0 {width} {height}" xmlns="http://www.w3.org/2000/svg"> <!-- Generated with Rich https://www.textualize.io --> <style>
@font-face {{ font-family: "Fira Code"; src: local("FiraCode-Regular"), url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"), url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff"); font-style: normal; font-weight: 400; }} @font-face {{ font-family: "Fira Code"; src: local("FiraCode-Bold"), url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"), url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff"); font-style: bold; font-weight: 700; }}
.{unique_id}-matrix {{ font-family: Fira Code, monospace; font-size: {char_height}px; line-height: {line_height}px; font-variant-east-asian: full-width; }}
.{unique_id}-title {{ font-size: 18px; font-weight: bold; font-family: arial; }}
{styles} </style>
<defs> <clipPath id="{unique_id}-clip-terminal"> <rect x="0" y="0" width="{terminal_width}" height="{terminal_height}" /> </clipPath> {lines} </defs>
{chrome} <g transform="translate({terminal_x}, {terminal_y})" clip-path="url(#{unique_id}-clip-terminal)"> {backgrounds} <g class="{unique_id}-matrix"> {matrix} </g> </g></svg>"""
_SVG_FONT_FAMILY = "Rich Fira Code"_SVG_CLASSES_PREFIX = "rich-svg"12345678910from typing import Any
def load_ipython_extension(ip: Any) -> None: # pragma: no cover # prevent circular import from rich.pretty import install from rich.traceback import install as tr_install
install() tr_install()123456789101112131415161718192021222324from __future__ import annotations
from typing import IO, Callable
def get_fileno(file_like: IO[str]) -> int | None: """Get fileno() from a file, accounting for poorly implemented file-like objects.
Args: file_like (IO): A file-like object.
Returns: int | None: The result of fileno if available, or None if operation failed. """ fileno: Callable[[], int] | None = getattr(file_like, "fileno", None) if fileno is not None: try: return fileno() except Exception: # `fileno` is documented as potentially raising a OSError # Alas, from the issues, there are so many poorly implemented file-like objects, # that `fileno()` can raise just about anything. return None return None123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272import inspectfrom inspect import cleandoc, getdoc, getfile, isclass, ismodule, signaturefrom typing import Any, Collection, Iterable, Optional, Tuple, Type, Union
from .console import Group, RenderableTypefrom .control import escape_control_codesfrom .highlighter import ReprHighlighterfrom .jupyter import JupyterMixinfrom .panel import Panelfrom .pretty import Prettyfrom .table import Tablefrom .text import Text, TextType
def _first_paragraph(doc: str) -> str: """Get the first paragraph from a docstring.""" paragraph, _, _ = doc.partition("\n\n") return paragraph
class Inspect(JupyterMixin): """A renderable to inspect any Python Object.
Args: obj (Any): An object to inspect. title (str, optional): Title to display over inspect result, or None use type. Defaults to None. help (bool, optional): Show full help text rather than just first paragraph. Defaults to False. methods (bool, optional): Enable inspection of callables. Defaults to False. docs (bool, optional): Also render doc strings. Defaults to True. private (bool, optional): Show private attributes (beginning with underscore). Defaults to False. dunder (bool, optional): Show attributes starting with double underscore. Defaults to False. sort (bool, optional): Sort attributes alphabetically, callables at the top, leading and trailing underscores ignored. Defaults to True. all (bool, optional): Show all attributes. Defaults to False. value (bool, optional): Pretty print value of object. Defaults to True. """
def __init__( self, obj: Any, *, title: Optional[TextType] = None, help: bool = False, methods: bool = False, docs: bool = True, private: bool = False, dunder: bool = False, sort: bool = True, all: bool = True, value: bool = True, ) -> None: self.highlighter = ReprHighlighter() self.obj = obj self.title = title or self._make_title(obj) if all: methods = private = dunder = True self.help = help self.methods = methods self.docs = docs or help self.private = private or dunder self.dunder = dunder self.sort = sort self.value = value
def _make_title(self, obj: Any) -> Text: """Make a default title.""" title_str = ( str(obj) if (isclass(obj) or callable(obj) or ismodule(obj)) else str(type(obj)) ) title_text = self.highlighter(title_str) return title_text
def __rich__(self) -> Panel: return Panel.fit( Group(*self._render()), title=self.title, border_style="scope.border", padding=(0, 1), )
def _get_signature(self, name: str, obj: Any) -> Optional[Text]: """Get a signature for a callable.""" try: _signature = str(signature(obj)) + ":" except ValueError: _signature = "(...)" except TypeError: return None
source_filename: Optional[str] = None try: source_filename = getfile(obj) except (OSError, TypeError): # OSError is raised if obj has no source file, e.g. when defined in REPL. pass
callable_name = Text(name, style="inspect.callable") if source_filename: callable_name.stylize(f"link file://{source_filename}") signature_text = self.highlighter(_signature)
qualname = name or getattr(obj, "__qualname__", name) if not isinstance(qualname, str): qualname = getattr(obj, "__name__", name) if not isinstance(qualname, str): qualname = name
# If obj is a module, there may be classes (which are callable) to display if inspect.isclass(obj): prefix = "class" elif inspect.iscoroutinefunction(obj): prefix = "async def" else: prefix = "def"
qual_signature = Text.assemble( (f"{prefix} ", f"inspect.{prefix.replace(' ', '_')}"), (qualname, "inspect.callable"), signature_text, )
return qual_signature
def _render(self) -> Iterable[RenderableType]: """Render object."""
def sort_items(item: Tuple[str, Any]) -> Tuple[bool, str]: key, (_error, value) = item return (callable(value), key.strip("_").lower())
def safe_getattr(attr_name: str) -> Tuple[Any, Any]: """Get attribute or any exception.""" try: return (None, getattr(obj, attr_name)) except Exception as error: return (error, None)
obj = self.obj keys = dir(obj) total_items = len(keys) if not self.dunder: keys = [key for key in keys if not key.startswith("__")] if not self.private: keys = [key for key in keys if not key.startswith("_")] not_shown_count = total_items - len(keys) items = [(key, safe_getattr(key)) for key in keys] if self.sort: items.sort(key=sort_items)
items_table = Table.grid(padding=(0, 1), expand=False) items_table.add_column(justify="right") add_row = items_table.add_row highlighter = self.highlighter
if callable(obj): signature = self._get_signature("", obj) if signature is not None: yield signature yield ""
if self.docs: _doc = self._get_formatted_doc(obj) if _doc is not None: doc_text = Text(_doc, style="inspect.help") doc_text = highlighter(doc_text) yield doc_text yield ""
if self.value and not (isclass(obj) or callable(obj) or ismodule(obj)): yield Panel( Pretty(obj, indent_guides=True, max_length=10, max_string=60), border_style="inspect.value.border", ) yield ""
for key, (error, value) in items: key_text = Text.assemble( ( key, "inspect.attr.dunder" if key.startswith("__") else "inspect.attr", ), (" =", "inspect.equals"), ) if error is not None: warning = key_text.copy() warning.stylize("inspect.error") add_row(warning, highlighter(repr(error))) continue
if callable(value): if not self.methods: continue
_signature_text = self._get_signature(key, value) if _signature_text is None: add_row(key_text, Pretty(value, highlighter=highlighter)) else: if self.docs: docs = self._get_formatted_doc(value) if docs is not None: _signature_text.append("\n" if "\n" in docs else " ") doc = highlighter(docs) doc.stylize("inspect.doc") _signature_text.append(doc)
add_row(key_text, _signature_text) else: add_row(key_text, Pretty(value, highlighter=highlighter)) if items_table.row_count: yield items_table elif not_shown_count: yield Text.from_markup( f"[b cyan]{not_shown_count}[/][i] attribute(s) not shown.[/i] " f"Run [b][magenta]inspect[/]([not b]inspect[/])[/b] for options." )
def _get_formatted_doc(self, object_: Any) -> Optional[str]: """ Extract the docstring of an object, process it and returns it. The processing consists in cleaning up the docstring's indentation, taking only its 1st paragraph if `self.help` is not True, and escape its control codes.
Args: object_ (Any): the object to get the docstring from.
Returns: Optional[str]: the processed docstring, or None if no docstring was found. """ docs = getdoc(object_) if docs is None: return None docs = cleandoc(docs).strip() if not self.help: docs = _first_paragraph(docs) return escape_control_codes(docs)
def get_object_types_mro(obj: Union[object, Type[Any]]) -> Tuple[type, ...]: """Returns the MRO of an object's class, or of the object itself if it's a class.""" if not hasattr(obj, "__mro__"): # N.B. we cannot use `if type(obj) is type` here because it doesn't work with # some types of classes, such as the ones that use abc.ABCMeta. obj = type(obj) return getattr(obj, "__mro__", ())
def get_object_types_mro_as_strings(obj: object) -> Collection[str]: """ Returns the MRO of an object's class as full qualified names, or of the object itself if it's a class.
Examples: `object_types_mro_as_strings(JSONDecoder)` will return `['json.decoder.JSONDecoder', 'builtins.object']` """ return [ f'{getattr(type_, "__module__", "")}.{getattr(type_, "__qualname__", "")}' for type_ in get_object_types_mro(obj) ]
def is_object_one_of_types( obj: object, fully_qualified_types_names: Collection[str]) -> bool: """ Returns `True` if the given object's class (or the object itself, if it's a class) has one of the fully qualified names in its MRO. """ for type_name in get_object_types_mro_as_strings(obj): if type_name in fully_qualified_types_names: return True return False12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394from datetime import datetimefrom typing import Iterable, List, Optional, TYPE_CHECKING, Union, Callable
from .text import Text, TextType
if TYPE_CHECKING: from .console import Console, ConsoleRenderable, RenderableType from .table import Table
FormatTimeCallable = Callable[[datetime], Text]
class LogRender: def __init__( self, show_time: bool = True, show_level: bool = False, show_path: bool = True, time_format: Union[str, FormatTimeCallable] = "[%x %X]", omit_repeated_times: bool = True, level_width: Optional[int] = 8, ) -> None: self.show_time = show_time self.show_level = show_level self.show_path = show_path self.time_format = time_format self.omit_repeated_times = omit_repeated_times self.level_width = level_width self._last_time: Optional[Text] = None
def __call__( self, console: "Console", renderables: Iterable["ConsoleRenderable"], log_time: Optional[datetime] = None, time_format: Optional[Union[str, FormatTimeCallable]] = None, level: TextType = "", path: Optional[str] = None, line_no: Optional[int] = None, link_path: Optional[str] = None, ) -> "Table": from .containers import Renderables from .table import Table
output = Table.grid(padding=(0, 1)) output.expand = True if self.show_time: output.add_column(style="log.time") if self.show_level: output.add_column(style="log.level", width=self.level_width) output.add_column(ratio=1, style="log.message", overflow="fold") if self.show_path and path: output.add_column(style="log.path") row: List["RenderableType"] = [] if self.show_time: log_time = log_time or console.get_datetime() time_format = time_format or self.time_format if callable(time_format): log_time_display = time_format(log_time) else: log_time_display = Text(log_time.strftime(time_format)) if log_time_display == self._last_time and self.omit_repeated_times: row.append(Text(" " * len(log_time_display))) else: row.append(log_time_display) self._last_time = log_time_display if self.show_level: row.append(level)
row.append(Renderables(renderables)) if self.show_path and path: path_text = Text() path_text.append( path, style=f"link file://{link_path}" if link_path else "" ) if line_no: path_text.append(":") path_text.append( f"{line_no}", style=f"link file://{link_path}#{line_no}" if link_path else "", ) row.append(path_text)
output.add_row(*row) return output
if __name__ == "__main__": # pragma: no cover from rich.console import Console
c = Console() c.print("[on blue]Hello", justify="right") c.log("[on blue]hello", justify="right")12345678910111213141516171819202122232425262728293031323334353637383940414243from typing import Iterable, Tuple, TypeVar
T = TypeVar("T")
def loop_first(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: """Iterate and generate a tuple with a flag for first value.""" iter_values = iter(values) try: value = next(iter_values) except StopIteration: return yield True, value for value in iter_values: yield False, value
def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: """Iterate and generate a tuple with a flag for last value.""" iter_values = iter(values) try: previous_value = next(iter_values) except StopIteration: return for value in iter_values: yield False, previous_value previous_value = value yield True, previous_value
def loop_first_last(values: Iterable[T]) -> Iterable[Tuple[bool, bool, T]]: """Iterate and generate a tuple with a flag for first and last value.""" iter_values = iter(values) try: previous_value = next(iter_values) except StopIteration: return first = True for value in iter_values: yield first, False, previous_value first = False previous_value = value yield first, True, previous_value123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869from types import TracebackTypefrom typing import IO, Iterable, Iterator, List, Optional, Type
class NullFile(IO[str]): def close(self) -> None: pass
def isatty(self) -> bool: return False
def read(self, __n: int = 1) -> str: return ""
def readable(self) -> bool: return False
def readline(self, __limit: int = 1) -> str: return ""
def readlines(self, __hint: int = 1) -> List[str]: return []
def seek(self, __offset: int, __whence: int = 1) -> int: return 0
def seekable(self) -> bool: return False
def tell(self) -> int: return 0
def truncate(self, __size: Optional[int] = 1) -> int: return 0
def writable(self) -> bool: return False
def writelines(self, __lines: Iterable[str]) -> None: pass
def __next__(self) -> str: return ""
def __iter__(self) -> Iterator[str]: return iter([""])
def __enter__(self) -> IO[str]: return self
def __exit__( self, __t: Optional[Type[BaseException]], __value: Optional[BaseException], __traceback: Optional[TracebackType], ) -> None: pass
def write(self, text: str) -> int: return 0
def flush(self) -> None: pass
def fileno(self) -> int: return -1
NULL_FILE = NullFile()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309from .palette import Palette
# Taken from https://en.wikipedia.org/wiki/ANSI_escape_code (Windows 10 column)WINDOWS_PALETTE = Palette( [ (12, 12, 12), (197, 15, 31), (19, 161, 14), (193, 156, 0), (0, 55, 218), (136, 23, 152), (58, 150, 221), (204, 204, 204), (118, 118, 118), (231, 72, 86), (22, 198, 12), (249, 241, 165), (59, 120, 255), (180, 0, 158), (97, 214, 214), (242, 242, 242), ])
# # The standard ansi colors (including bright variants)STANDARD_PALETTE = Palette( [ (0, 0, 0), (170, 0, 0), (0, 170, 0), (170, 85, 0), (0, 0, 170), (170, 0, 170), (0, 170, 170), (170, 170, 170), (85, 85, 85), (255, 85, 85), (85, 255, 85), (255, 255, 85), (85, 85, 255), (255, 85, 255), (85, 255, 255), (255, 255, 255), ])
# The 256 color paletteEIGHT_BIT_PALETTE = Palette( [ (0, 0, 0), (128, 0, 0), (0, 128, 0), (128, 128, 0), (0, 0, 128), (128, 0, 128), (0, 128, 128), (192, 192, 192), (128, 128, 128), (255, 0, 0), (0, 255, 0), (255, 255, 0), (0, 0, 255), (255, 0, 255), (0, 255, 255), (255, 255, 255), (0, 0, 0), (0, 0, 95), (0, 0, 135), (0, 0, 175), (0, 0, 215), (0, 0, 255), (0, 95, 0), (0, 95, 95), (0, 95, 135), (0, 95, 175), (0, 95, 215), (0, 95, 255), (0, 135, 0), (0, 135, 95), (0, 135, 135), (0, 135, 175), (0, 135, 215), (0, 135, 255), (0, 175, 0), (0, 175, 95), (0, 175, 135), (0, 175, 175), (0, 175, 215), (0, 175, 255), (0, 215, 0), (0, 215, 95), (0, 215, 135), (0, 215, 175), (0, 215, 215), (0, 215, 255), (0, 255, 0), (0, 255, 95), (0, 255, 135), (0, 255, 175), (0, 255, 215), (0, 255, 255), (95, 0, 0), (95, 0, 95), (95, 0, 135), (95, 0, 175), (95, 0, 215), (95, 0, 255), (95, 95, 0), (95, 95, 95), (95, 95, 135), (95, 95, 175), (95, 95, 215), (95, 95, 255), (95, 135, 0), (95, 135, 95), (95, 135, 135), (95, 135, 175), (95, 135, 215), (95, 135, 255), (95, 175, 0), (95, 175, 95), (95, 175, 135), (95, 175, 175), (95, 175, 215), (95, 175, 255), (95, 215, 0), (95, 215, 95), (95, 215, 135), (95, 215, 175), (95, 215, 215), (95, 215, 255), (95, 255, 0), (95, 255, 95), (95, 255, 135), (95, 255, 175), (95, 255, 215), (95, 255, 255), (135, 0, 0), (135, 0, 95), (135, 0, 135), (135, 0, 175), (135, 0, 215), (135, 0, 255), (135, 95, 0), (135, 95, 95), (135, 95, 135), (135, 95, 175), (135, 95, 215), (135, 95, 255), (135, 135, 0), (135, 135, 95), (135, 135, 135), (135, 135, 175), (135, 135, 215), (135, 135, 255), (135, 175, 0), (135, 175, 95), (135, 175, 135), (135, 175, 175), (135, 175, 215), (135, 175, 255), (135, 215, 0), (135, 215, 95), (135, 215, 135), (135, 215, 175), (135, 215, 215), (135, 215, 255), (135, 255, 0), (135, 255, 95), (135, 255, 135), (135, 255, 175), (135, 255, 215), (135, 255, 255), (175, 0, 0), (175, 0, 95), (175, 0, 135), (175, 0, 175), (175, 0, 215), (175, 0, 255), (175, 95, 0), (175, 95, 95), (175, 95, 135), (175, 95, 175), (175, 95, 215), (175, 95, 255), (175, 135, 0), (175, 135, 95), (175, 135, 135), (175, 135, 175), (175, 135, 215), (175, 135, 255), (175, 175, 0), (175, 175, 95), (175, 175, 135), (175, 175, 175), (175, 175, 215), (175, 175, 255), (175, 215, 0), (175, 215, 95), (175, 215, 135), (175, 215, 175), (175, 215, 215), (175, 215, 255), (175, 255, 0), (175, 255, 95), (175, 255, 135), (175, 255, 175), (175, 255, 215), (175, 255, 255), (215, 0, 0), (215, 0, 95), (215, 0, 135), (215, 0, 175), (215, 0, 215), (215, 0, 255), (215, 95, 0), (215, 95, 95), (215, 95, 135), (215, 95, 175), (215, 95, 215), (215, 95, 255), (215, 135, 0), (215, 135, 95), (215, 135, 135), (215, 135, 175), (215, 135, 215), (215, 135, 255), (215, 175, 0), (215, 175, 95), (215, 175, 135), (215, 175, 175), (215, 175, 215), (215, 175, 255), (215, 215, 0), (215, 215, 95), (215, 215, 135), (215, 215, 175), (215, 215, 215), (215, 215, 255), (215, 255, 0), (215, 255, 95), (215, 255, 135), (215, 255, 175), (215, 255, 215), (215, 255, 255), (255, 0, 0), (255, 0, 95), (255, 0, 135), (255, 0, 175), (255, 0, 215), (255, 0, 255), (255, 95, 0), (255, 95, 95), (255, 95, 135), (255, 95, 175), (255, 95, 215), (255, 95, 255), (255, 135, 0), (255, 135, 95), (255, 135, 135), (255, 135, 175), (255, 135, 215), (255, 135, 255), (255, 175, 0), (255, 175, 95), (255, 175, 135), (255, 175, 175), (255, 175, 215), (255, 175, 255), (255, 215, 0), (255, 215, 95), (255, 215, 135), (255, 215, 175), (255, 215, 215), (255, 215, 255), (255, 255, 0), (255, 255, 95), (255, 255, 135), (255, 255, 175), (255, 255, 215), (255, 255, 255), (8, 8, 8), (18, 18, 18), (28, 28, 28), (38, 38, 38), (48, 48, 48), (58, 58, 58), (68, 68, 68), (78, 78, 78), (88, 88, 88), (98, 98, 98), (108, 108, 108), (118, 118, 118), (128, 128, 128), (138, 138, 138), (148, 148, 148), (158, 158, 158), (168, 168, 168), (178, 178, 178), (188, 188, 188), (198, 198, 198), (208, 208, 208), (218, 218, 218), (228, 228, 228), (238, 238, 238), ])1234567891011121314151617from typing import Optional
def pick_bool(*values: Optional[bool]) -> bool: """Pick the first non-none bool or return the last value.
Args: *values (bool): Any number of boolean or None values.
Returns: bool: First non-none boolean. """ assert values, "1 or more values required" for value in values: if value is not None: return value return bool(value)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153from fractions import Fractionfrom math import ceilfrom typing import cast, List, Optional, Sequence, Protocol
class Edge(Protocol): """Any object that defines an edge (such as Layout)."""
size: Optional[int] = None ratio: int = 1 minimum_size: int = 1
def ratio_resolve(total: int, edges: Sequence[Edge]) -> List[int]: """Divide total space to satisfy size, ratio, and minimum_size, constraints.
The returned list of integers should add up to total in most cases, unless it is impossible to satisfy all the constraints. For instance, if there are two edges with a minimum size of 20 each and `total` is 30 then the returned list will be greater than total. In practice, this would mean that a Layout object would clip the rows that would overflow the screen height.
Args: total (int): Total number of characters. edges (List[Edge]): Edges within total space.
Returns: List[int]: Number of characters for each edge. """ # Size of edge or None for yet to be determined sizes = [(edge.size or None) for edge in edges]
_Fraction = Fraction
# While any edges haven't been calculated while None in sizes: # Get flexible edges and index to map these back on to sizes list flexible_edges = [ (index, edge) for index, (size, edge) in enumerate(zip(sizes, edges)) if size is None ] # Remaining space in total remaining = total - sum(size or 0 for size in sizes) if remaining <= 0: # No room for flexible edges return [ ((edge.minimum_size or 1) if size is None else size) for size, edge in zip(sizes, edges) ] # Calculate number of characters in a ratio portion portion = _Fraction( remaining, sum((edge.ratio or 1) for _, edge in flexible_edges) )
# If any edges will be less than their minimum, replace size with the minimum for index, edge in flexible_edges: if portion * edge.ratio <= edge.minimum_size: sizes[index] = edge.minimum_size # New fixed size will invalidate calculations, so we need to repeat the process break else: # Distribute flexible space and compensate for rounding error # Since edge sizes can only be integers we need to add the remainder # to the following line remainder = _Fraction(0) for index, edge in flexible_edges: size, remainder = divmod(portion * edge.ratio + remainder, 1) sizes[index] = size break # Sizes now contains integers only return cast(List[int], sizes)
def ratio_reduce( total: int, ratios: List[int], maximums: List[int], values: List[int]) -> List[int]: """Divide an integer total in to parts based on ratios.
Args: total (int): The total to divide. ratios (List[int]): A list of integer ratios. maximums (List[int]): List of maximums values for each slot. values (List[int]): List of values
Returns: List[int]: A list of integers guaranteed to sum to total. """ ratios = [ratio if _max else 0 for ratio, _max in zip(ratios, maximums)] total_ratio = sum(ratios) if not total_ratio: return values[:] total_remaining = total result: List[int] = [] append = result.append for ratio, maximum, value in zip(ratios, maximums, values): if ratio and total_ratio > 0: distributed = min(maximum, round(ratio * total_remaining / total_ratio)) append(value - distributed) total_remaining -= distributed total_ratio -= ratio else: append(value) return result
def ratio_distribute( total: int, ratios: List[int], minimums: Optional[List[int]] = None) -> List[int]: """Distribute an integer total in to parts based on ratios.
Args: total (int): The total to divide. ratios (List[int]): A list of integer ratios. minimums (List[int]): List of minimum values for each slot.
Returns: List[int]: A list of integers guaranteed to sum to total. """ if minimums: ratios = [ratio if _min else 0 for ratio, _min in zip(ratios, minimums)] total_ratio = sum(ratios) assert total_ratio > 0, "Sum of ratios must be > 0"
total_remaining = total distributed_total: List[int] = [] append = distributed_total.append if minimums is None: _minimums = [0] * len(ratios) else: _minimums = minimums for ratio, minimum in zip(ratios, _minimums): if total_ratio > 0: distributed = max(minimum, ceil(ratio * total_remaining / total_ratio)) else: distributed = total_remaining append(distributed) total_ratio -= ratio total_remaining -= distributed return distributed_total
if __name__ == "__main__": from dataclasses import dataclass
@dataclass class E: size: Optional[int] = None ratio: int = 1 minimum_size: int = 1
resolved = ratio_resolve(110, [E(None, 1, 1), E(None, 1, 1), E(None, 1, 1)]) print(sum(resolved))123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482"""Spinners are from:* cli-spinners: MIT License Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."""
SPINNERS = { "dots": { "interval": 80, "frames": "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏", }, "dots2": {"interval": 80, "frames": "⣾⣽⣻⢿⡿⣟⣯⣷"}, "dots3": { "interval": 80, "frames": "⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓", }, "dots4": { "interval": 80, "frames": "⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆", }, "dots5": { "interval": 80, "frames": "⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋", }, "dots6": { "interval": 80, "frames": "⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁", }, "dots7": { "interval": 80, "frames": "⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈", }, "dots8": { "interval": 80, "frames": "⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈", }, "dots9": {"interval": 80, "frames": "⢹⢺⢼⣸⣇⡧⡗⡏"}, "dots10": {"interval": 80, "frames": "⢄⢂⢁⡁⡈⡐⡠"}, "dots11": {"interval": 100, "frames": "⠁⠂⠄⡀⢀⠠⠐⠈"}, "dots12": { "interval": 80, "frames": [ "⢀⠀", "⡀⠀", "⠄⠀", "⢂⠀", "⡂⠀", "⠅⠀", "⢃⠀", "⡃⠀", "⠍⠀", "⢋⠀", "⡋⠀", "⠍⠁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⢈⠩", "⡀⢙", "⠄⡙", "⢂⠩", "⡂⢘", "⠅⡘", "⢃⠨", "⡃⢐", "⠍⡐", "⢋⠠", "⡋⢀", "⠍⡁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⠈⠩", "⠀⢙", "⠀⡙", "⠀⠩", "⠀⢘", "⠀⡘", "⠀⠨", "⠀⢐", "⠀⡐", "⠀⠠", "⠀⢀", "⠀⡀", ], }, "dots8Bit": { "interval": 80, "frames": "⠀⠁⠂⠃⠄⠅⠆⠇⡀⡁⡂⡃⡄⡅⡆⡇⠈⠉⠊⠋⠌⠍⠎⠏⡈⡉⡊⡋⡌⡍⡎⡏⠐⠑⠒⠓⠔⠕⠖⠗⡐⡑⡒⡓⡔⡕⡖⡗⠘⠙⠚⠛⠜⠝⠞⠟⡘⡙" "⡚⡛⡜⡝⡞⡟⠠⠡⠢⠣⠤⠥⠦⠧⡠⡡⡢⡣⡤⡥⡦⡧⠨⠩⠪⠫⠬⠭⠮⠯⡨⡩⡪⡫⡬⡭⡮⡯⠰⠱⠲⠳⠴⠵⠶⠷⡰⡱⡲⡳⡴⡵⡶⡷⠸⠹⠺⠻" "⠼⠽⠾⠿⡸⡹⡺⡻⡼⡽⡾⡿⢀⢁⢂⢃⢄⢅⢆⢇⣀⣁⣂⣃⣄⣅⣆⣇⢈⢉⢊⢋⢌⢍⢎⢏⣈⣉⣊⣋⣌⣍⣎⣏⢐⢑⢒⢓⢔⢕⢖⢗⣐⣑⣒⣓⣔⣕" "⣖⣗⢘⢙⢚⢛⢜⢝⢞⢟⣘⣙⣚⣛⣜⣝⣞⣟⢠⢡⢢⢣⢤⢥⢦⢧⣠⣡⣢⣣⣤⣥⣦⣧⢨⢩⢪⢫⢬⢭⢮⢯⣨⣩⣪⣫⣬⣭⣮⣯⢰⢱⢲⢳⢴⢵⢶⢷" "⣰⣱⣲⣳⣴⣵⣶⣷⢸⢹⢺⢻⢼⢽⢾⢿⣸⣹⣺⣻⣼⣽⣾⣿", }, "line": {"interval": 130, "frames": ["-", "\\", "|", "/"]}, "line2": {"interval": 100, "frames": "⠂-–—–-"}, "pipe": {"interval": 100, "frames": "┤┘┴└├┌┬┐"}, "simpleDots": {"interval": 400, "frames": [". ", ".. ", "...", " "]}, "simpleDotsScrolling": { "interval": 200, "frames": [". ", ".. ", "...", " ..", " .", " "], }, "star": {"interval": 70, "frames": "✶✸✹✺✹✷"}, "star2": {"interval": 80, "frames": "+x*"}, "flip": { "interval": 70, "frames": "___-``'´-___", }, "hamburger": {"interval": 100, "frames": "☱☲☴"}, "growVertical": { "interval": 120, "frames": "▁▃▄▅▆▇▆▅▄▃", }, "growHorizontal": { "interval": 120, "frames": "▏▎▍▌▋▊▉▊▋▌▍▎", }, "balloon": {"interval": 140, "frames": " .oO@* "}, "balloon2": {"interval": 120, "frames": ".oO°Oo."}, "noise": {"interval": 100, "frames": "▓▒░"}, "bounce": {"interval": 120, "frames": "⠁⠂⠄⠂"}, "boxBounce": {"interval": 120, "frames": "▖▘▝▗"}, "boxBounce2": {"interval": 100, "frames": "▌▀▐▄"}, "triangle": {"interval": 50, "frames": "◢◣◤◥"}, "arc": {"interval": 100, "frames": "◜◠◝◞◡◟"}, "circle": {"interval": 120, "frames": "◡⊙◠"}, "squareCorners": {"interval": 180, "frames": "◰◳◲◱"}, "circleQuarters": {"interval": 120, "frames": "◴◷◶◵"}, "circleHalves": {"interval": 50, "frames": "◐◓◑◒"}, "squish": {"interval": 100, "frames": "╫╪"}, "toggle": {"interval": 250, "frames": "⊶⊷"}, "toggle2": {"interval": 80, "frames": "▫▪"}, "toggle3": {"interval": 120, "frames": "□■"}, "toggle4": {"interval": 100, "frames": "■□▪▫"}, "toggle5": {"interval": 100, "frames": "▮▯"}, "toggle6": {"interval": 300, "frames": "ဝ၀"}, "toggle7": {"interval": 80, "frames": "⦾⦿"}, "toggle8": {"interval": 100, "frames": "◍◌"}, "toggle9": {"interval": 100, "frames": "◉◎"}, "toggle10": {"interval": 100, "frames": "㊂㊀㊁"}, "toggle11": {"interval": 50, "frames": "⧇⧆"}, "toggle12": {"interval": 120, "frames": "☗☖"}, "toggle13": {"interval": 80, "frames": "=*-"}, "arrow": {"interval": 100, "frames": "←↖↑↗→↘↓↙"}, "arrow2": { "interval": 80, "frames": ["⬆️ ", "↗️ ", "➡️ ", "↘️ ", "⬇️ ", "↙️ ", "⬅️ ", "↖️ "], }, "arrow3": { "interval": 120, "frames": ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], }, "bouncingBar": { "interval": 80, "frames": [ "[ ]", "[= ]", "[== ]", "[=== ]", "[ ===]", "[ ==]", "[ =]", "[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]", ], }, "bouncingBall": { "interval": 80, "frames": [ "( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )", "(● )", ], }, "smiley": {"interval": 200, "frames": ["😄 ", "😝 "]}, "monkey": {"interval": 300, "frames": ["🙈 ", "🙈 ", "🙉 ", "🙊 "]}, "hearts": {"interval": 100, "frames": ["💛 ", "💙 ", "💜 ", "💚 ", "❤️ "]}, "clock": { "interval": 100, "frames": [ "🕛 ", "🕐 ", "🕑 ", "🕒 ", "🕓 ", "🕔 ", "🕕 ", "🕖 ", "🕗 ", "🕘 ", "🕙 ", "🕚 ", ], }, "earth": {"interval": 180, "frames": ["🌍 ", "🌎 ", "🌏 "]}, "material": { "interval": 17, "frames": [ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "███████▁▁▁▁▁▁▁▁▁▁▁▁▁", "████████▁▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "██████████▁▁▁▁▁▁▁▁▁▁", "███████████▁▁▁▁▁▁▁▁▁", "█████████████▁▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁▁██████████████▁▁▁▁", "▁▁▁██████████████▁▁▁", "▁▁▁▁█████████████▁▁▁", "▁▁▁▁██████████████▁▁", "▁▁▁▁██████████████▁▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁▁██████████████", "▁▁▁▁▁▁██████████████", "▁▁▁▁▁▁▁█████████████", "▁▁▁▁▁▁▁█████████████", "▁▁▁▁▁▁▁▁████████████", "▁▁▁▁▁▁▁▁████████████", "▁▁▁▁▁▁▁▁▁███████████", "▁▁▁▁▁▁▁▁▁███████████", "▁▁▁▁▁▁▁▁▁▁██████████", "▁▁▁▁▁▁▁▁▁▁██████████", "▁▁▁▁▁▁▁▁▁▁▁▁████████", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█", "████████▁▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "███████████▁▁▁▁▁▁▁▁▁", "████████████▁▁▁▁▁▁▁▁", "████████████▁▁▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁▁▁█████████████▁▁▁▁", "▁▁▁▁▁████████████▁▁▁", "▁▁▁▁▁████████████▁▁▁", "▁▁▁▁▁▁███████████▁▁▁", "▁▁▁▁▁▁▁▁█████████▁▁▁", "▁▁▁▁▁▁▁▁█████████▁▁▁", "▁▁▁▁▁▁▁▁▁█████████▁▁", "▁▁▁▁▁▁▁▁▁█████████▁▁", "▁▁▁▁▁▁▁▁▁▁█████████▁", "▁▁▁▁▁▁▁▁▁▁▁████████▁", "▁▁▁▁▁▁▁▁▁▁▁████████▁", "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", ], }, "moon": { "interval": 80, "frames": ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], }, "runner": {"interval": 140, "frames": ["🚶 ", "🏃 "]}, "pong": { "interval": 80, "frames": [ "▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌", ], }, "shark": { "interval": 120, "frames": [ "▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌", ], }, "dqpb": {"interval": 100, "frames": "dqpb"}, "weather": { "interval": 100, "frames": [ "☀️ ", "☀️ ", "☀️ ", "🌤 ", "⛅️ ", "🌥 ", "☁️ ", "🌧 ", "🌨 ", "🌧 ", "🌨 ", "🌧 ", "🌨 ", "⛈ ", "🌨 ", "🌧 ", "🌨 ", "☁️ ", "🌥 ", "⛅️ ", "🌤 ", "☀️ ", "☀️ ", ], }, "christmas": {"interval": 400, "frames": "🌲🎄"}, "grenade": { "interval": 80, "frames": [ "، ", "′ ", " ´ ", " ‾ ", " ⸌", " ⸊", " |", " ⁎", " ⁕", " ෴ ", " ⁓", " ", " ", " ", ], }, "point": {"interval": 125, "frames": ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"]}, "layer": {"interval": 150, "frames": "-=≡"}, "betaWave": { "interval": 80, "frames": [ "ρββββββ", "βρβββββ", "ββρββββ", "βββρβββ", "ββββρββ", "βββββρβ", "ββββββρ", ], }, "aesthetic": { "interval": 80, "frames": [ "▰▱▱▱▱▱▱", "▰▰▱▱▱▱▱", "▰▰▰▱▱▱▱", "▰▰▰▰▱▱▱", "▰▰▰▰▰▱▱", "▰▰▰▰▰▰▱", "▰▰▰▰▰▰▰", "▰▱▱▱▱▱▱", ], },}12345678910111213141516from typing import List, TypeVar
T = TypeVar("T")
class Stack(List[T]): """A small shim over builtin list."""
@property def top(self) -> T: """Get top of stack.""" return self[-1]
def push(self, item: T) -> None: """Push an item on to the stack (append in stack nomenclature).""" self.append(item)12345678910111213141516171819"""Timer context manager, only used in debug.
"""
from time import time
import contextlibfrom typing import Generator
@contextlib.contextmanagerdef timer(subject: str = "time") -> Generator[None, None, None]: """print the elapsed time. (only used in debugging)""" start = time() yield elapsed = time() - start elapsed_ms = elapsed * 1000 print(f"{subject} elapsed {elapsed_ms:.1f}ms")123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293from __future__ import annotations
import bisectimport osimport sys
if sys.version_info[:2] >= (3, 9): from functools import cacheelse: from functools import lru_cache as cache # pragma: no cover
from importlib import import_modulefrom typing import TYPE_CHECKING, cast
from rich._unicode_data._versions import VERSIONS
if TYPE_CHECKING: from rich.cells import CellTable
VERSION_ORDER = sorted( [ tuple( map(int, version.split(".")), ) for version in VERSIONS ])VERSION_SET = frozenset(VERSIONS)
def _parse_version(version: str) -> tuple[int, int, int]: """Parse a version string into a tuple of 3 integers.
Args: version: A version string.
Raises: ValueError: If the version string is invalid.
Returns: A tuple of 3 integers. """ version_integers: tuple[int, ...] try: version_integers = tuple( map(int, version.split(".")), ) except ValueError: raise ValueError( f"unicode version string {version!r} is badly formatted" ) from None while len(version_integers) < 3: version_integers = version_integers + (0,) triple = cast("tuple[int, int, int]", version_integers[:3]) return triple
@cachedef load(unicode_version: str = "auto") -> CellTable: """Load a cell table for the given unicode version.
Args: unicode_version: Unicode version, or `None` to auto-detect.
""" if unicode_version == "auto": unicode_version = os.environ.get("UNICODE_VERSION", "latest") try: _parse_version(unicode_version) except ValueError: # The environment variable is invalid # Fallback to using the latest version seems reasonable unicode_version = "latest"
if unicode_version == "latest": version = VERSIONS[-1] else: try: version_numbers = _parse_version(unicode_version) except ValueError: version_numbers = _parse_version(VERSIONS[-1]) major, minor, patch = version_numbers version = f"{major}.{minor}.{patch}" if version not in VERSION_SET: insert_position = bisect.bisect_left(VERSION_ORDER, version_numbers) version = VERSIONS[max(0, insert_position - 1)]
version_path_component = version.replace(".", "-") module_name = f".unicode{version_path_component}" module = import_module(module_name, "rich._unicode_data") if TYPE_CHECKING: assert isinstance(module.cell_table, CellTable) return module.cell_table1234567891011121314151617181920212223VERSIONS = ( "4.1.0", "5.0.0", "5.1.0", "5.2.0", "6.0.0", "6.1.0", "6.2.0", "6.3.0", "7.0.0", "8.0.0", "9.0.0", "10.0.0", "11.0.0", "12.0.0", "12.1.0", "13.0.0", "14.0.0", "15.0.0", "15.1.0", "16.0.0", "17.0.0",)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "10.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2260, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6846, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7415, 7417, 0), (7616, 7673, 0), (7675, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12590, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69888, 69890, 0), (69927, 69940, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70090, 70092, 0), (70188, 70199, 0), (70206, 70206, 0), (70367, 70378, 0), (70400, 70403, 0), (70460, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (92912, 92916, 0), (92976, 92982, 0), (94033, 94078, 0), (94095, 94098, 0), (94176, 94177, 2), (94208, 100332, 2), (100352, 101106, 2), (110592, 110878, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128747, 128748, 2), (128756, 128760, 2), (129296, 129342, 2), (129344, 129356, 2), (129360, 129387, 2), (129408, 129431, 2), (129472, 129472, 2), (129488, 129510, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "11.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2259, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6846, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7415, 7417, 0), (7616, 7673, 0), (7675, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (69446, 69456, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70188, 70199, 0), (70206, 70206, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (92912, 92916, 0), (92976, 92982, 0), (94033, 94078, 0), (94095, 94098, 0), (94176, 94177, 2), (94208, 100337, 2), (100352, 101106, 2), (110592, 110878, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128747, 128748, 2), (128756, 128761, 2), (129296, 129342, 2), (129344, 129392, 2), (129395, 129398, 2), (129402, 129402, 2), (129404, 129442, 2), (129456, 129465, 2), (129472, 129474, 2), (129488, 129535, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "12.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2259, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6846, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7673, 0), (7675, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (69446, 69456, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70188, 70199, 0), (70206, 70206, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (78896, 78904, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94208, 100343, 2), (100352, 101106, 2), (110592, 110878, 2), (110928, 110930, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123184, 123190, 0), (123628, 123631, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128725, 2), (128747, 128748, 2), (128756, 128762, 2), (128992, 129003, 2), (129293, 129393, 2), (129395, 129398, 2), (129402, 129442, 2), (129445, 129450, 2), (129454, 129482, 2), (129485, 129535, 2), (129648, 129651, 2), (129656, 129658, 2), (129664, 129666, 2), (129680, 129685, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "����", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "12.1.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2259, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6846, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7673, 0), (7675, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (69446, 69456, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70188, 70199, 0), (70206, 70206, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (78896, 78904, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94208, 100343, 2), (100352, 101106, 2), (110592, 110878, 2), (110928, 110930, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123184, 123190, 0), (123628, 123631, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128725, 2), (128747, 128748, 2), (128756, 128762, 2), (128992, 129003, 2), (129293, 129393, 2), (129395, 129398, 2), (129402, 129442, 2), (129445, 129450, 2), (129454, 129482, 2), (129485, 129535, 2), (129648, 129651, 2), (129656, 129658, 2), (129664, 129666, 2), (129680, 129685, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "13.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2259, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2901, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3457, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6848, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7673, 0), (7675, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43052, 43052, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (69291, 69292, 0), (69446, 69456, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70094, 70095, 0), (70188, 70199, 0), (70206, 70206, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (71984, 71989, 0), (71991, 71992, 0), (71995, 71998, 0), (72000, 72000, 0), (72002, 72003, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (78896, 78904, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94180, 94180, 0), (94192, 94193, 0), (94208, 100343, 2), (100352, 101589, 2), (101632, 101640, 2), (110592, 110878, 2), (110928, 110930, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123184, 123190, 0), (123628, 123631, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128727, 2), (128747, 128748, 2), (128756, 128764, 2), (128992, 129003, 2), (129292, 129338, 2), (129340, 129349, 2), (129351, 129400, 2), (129402, 129483, 2), (129485, 129535, 2), (129648, 129652, 2), (129656, 129658, 2), (129664, 129670, 2), (129680, 129704, 2), (129712, 129718, 2), (129728, 129730, 2), (129744, 129750, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "���", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "14.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2200, 2207, 0), (2250, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2901, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3132, 3132, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3457, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5909, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6159, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6862, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43052, 43052, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (69291, 69292, 0), (69446, 69456, 0), (69506, 69509, 0), (69632, 69634, 0), (69688, 69702, 0), (69744, 69744, 0), (69747, 69748, 0), (69759, 69762, 0), (69808, 69818, 0), (69826, 69826, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70094, 70095, 0), (70188, 70199, 0), (70206, 70206, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (71984, 71989, 0), (71991, 71992, 0), (71995, 71998, 0), (72000, 72000, 0), (72002, 72003, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (78896, 78904, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94180, 94180, 0), (94192, 94193, 0), (94208, 100343, 2), (100352, 101589, 2), (101632, 101640, 2), (110576, 110579, 2), (110581, 110587, 2), (110589, 110590, 2), (110592, 110882, 2), (110928, 110930, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (118528, 118573, 0), (118576, 118598, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123184, 123190, 0), (123566, 123566, 0), (123628, 123631, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128727, 2), (128733, 128735, 2), (128747, 128748, 2), (128756, 128764, 2), (128992, 129003, 2), (129008, 129008, 2), (129292, 129338, 2), (129340, 129349, 2), (129351, 129535, 2), (129648, 129652, 2), (129656, 129660, 2), (129664, 129670, 2), (129680, 129708, 2), (129712, 129722, 2), (129728, 129733, 2), (129744, 129753, 2), (129760, 129767, 2), (129776, 129782, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "���", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "15.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2200, 2207, 0), (2250, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2901, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3132, 3132, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3315, 3315, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3457, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3790, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5909, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6159, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6862, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43052, 43052, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (69291, 69292, 0), (69373, 69375, 0), (69446, 69456, 0), (69506, 69509, 0), (69632, 69634, 0), (69688, 69702, 0), (69744, 69744, 0), (69747, 69748, 0), (69759, 69762, 0), (69808, 69818, 0), (69826, 69826, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70094, 70095, 0), (70188, 70199, 0), (70206, 70206, 0), (70209, 70209, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (71984, 71989, 0), (71991, 71992, 0), (71995, 71998, 0), (72000, 72000, 0), (72002, 72003, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (73472, 73473, 0), (73475, 73475, 0), (73524, 73530, 0), (73534, 73538, 0), (78896, 78912, 0), (78919, 78933, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94180, 94180, 0), (94192, 94193, 0), (94208, 100343, 2), (100352, 101589, 2), (101632, 101640, 2), (110576, 110579, 2), (110581, 110587, 2), (110589, 110590, 2), (110592, 110882, 2), (110898, 110898, 2), (110928, 110930, 2), (110933, 110933, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (118528, 118573, 0), (118576, 118598, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123023, 123023, 0), (123184, 123190, 0), (123566, 123566, 0), (123628, 123631, 0), (124140, 124143, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128727, 2), (128732, 128735, 2), (128747, 128748, 2), (128756, 128764, 2), (128992, 129003, 2), (129008, 129008, 2), (129292, 129338, 2), (129340, 129349, 2), (129351, 129535, 2), (129648, 129660, 2), (129664, 129672, 2), (129680, 129725, 2), (129727, 129733, 2), (129742, 129755, 2), (129760, 129768, 2), (129776, 129784, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "15.1.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2200, 2207, 0), (2250, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2901, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3132, 3132, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3315, 3315, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3457, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3790, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5909, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6159, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6862, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12771, 2), (12783, 12830, 2), (12832, 12871, 2), (12880, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43052, 43052, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (69291, 69292, 0), (69373, 69375, 0), (69446, 69456, 0), (69506, 69509, 0), (69632, 69634, 0), (69688, 69702, 0), (69744, 69744, 0), (69747, 69748, 0), (69759, 69762, 0), (69808, 69818, 0), (69826, 69826, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70094, 70095, 0), (70188, 70199, 0), (70206, 70206, 0), (70209, 70209, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (71984, 71989, 0), (71991, 71992, 0), (71995, 71998, 0), (72000, 72000, 0), (72002, 72003, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (73472, 73473, 0), (73475, 73475, 0), (73524, 73530, 0), (73534, 73538, 0), (78896, 78912, 0), (78919, 78933, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94180, 94180, 0), (94192, 94193, 0), (94208, 100343, 2), (100352, 101589, 2), (101632, 101640, 2), (110576, 110579, 2), (110581, 110587, 2), (110589, 110590, 2), (110592, 110882, 2), (110898, 110898, 2), (110928, 110930, 2), (110933, 110933, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (118528, 118573, 0), (118576, 118598, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123023, 123023, 0), (123184, 123190, 0), (123566, 123566, 0), (123628, 123631, 0), (124140, 124143, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128727, 2), (128732, 128735, 2), (128747, 128748, 2), (128756, 128764, 2), (128992, 129003, 2), (129008, 129008, 2), (129292, 129338, 2), (129340, 129349, 2), (129351, 129535, 2), (129648, 129660, 2), (129664, 129672, 2), (129680, 129725, 2), (129727, 129733, 2), (129742, 129755, 2), (129760, 129768, 2), (129776, 129784, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "16.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2199, 2207, 0), (2250, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2901, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3132, 3132, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3315, 3315, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3457, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3790, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5909, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6159, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6862, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9776, 9783, 2), (9800, 9811, 2), (9855, 9855, 2), (9866, 9871, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12773, 2), (12783, 12830, 2), (12832, 12871, 2), (12880, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43052, 43052, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (68969, 68973, 0), (69291, 69292, 0), (69372, 69375, 0), (69446, 69456, 0), (69506, 69509, 0), (69632, 69634, 0), (69688, 69702, 0), (69744, 69744, 0), (69747, 69748, 0), (69759, 69762, 0), (69808, 69818, 0), (69826, 69826, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70094, 70095, 0), (70188, 70199, 0), (70206, 70206, 0), (70209, 70209, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70584, 70592, 0), (70594, 70594, 0), (70597, 70597, 0), (70599, 70602, 0), (70604, 70608, 0), (70610, 70610, 0), (70625, 70626, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (71984, 71989, 0), (71991, 71992, 0), (71995, 71998, 0), (72000, 72000, 0), (72002, 72003, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (73472, 73473, 0), (73475, 73475, 0), (73524, 73530, 0), (73534, 73538, 0), (73562, 73562, 0), (78896, 78912, 0), (78919, 78933, 0), (90398, 90415, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94180, 94180, 0), (94192, 94193, 0), (94208, 100343, 2), (100352, 101589, 2), (101631, 101640, 2), (110576, 110579, 2), (110581, 110587, 2), (110589, 110590, 2), (110592, 110882, 2), (110898, 110898, 2), (110928, 110930, 2), (110933, 110933, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (118528, 118573, 0), (118576, 118598, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (119552, 119638, 2), (119648, 119670, 2), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123023, 123023, 0), (123184, 123190, 0), (123566, 123566, 0), (123628, 123631, 0), (124140, 124143, 0), (124398, 124399, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128727, 2), (128732, 128735, 2), (128747, 128748, 2), (128756, 128764, 2), (128992, 129003, 2), (129008, 129008, 2), (129292, 129338, 2), (129340, 129349, 2), (129351, 129535, 2), (129648, 129660, 2), (129664, 129673, 2), (129679, 129734, 2), (129742, 129756, 2), (129759, 129769, 2), (129776, 129784, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "17.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2045, 2045, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2199, 2207, 0), (2250, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2558, 2558, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2810, 2815, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2901, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3076, 0), (3132, 3132, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3315, 3315, 0), (3328, 3331, 0), (3387, 3388, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3457, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3772, 0), (3784, 3790, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5909, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6159, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6877, 0), (6880, 6891, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7412, 7412, 0), (7415, 7417, 0), (7616, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9776, 9783, 2), (9800, 9811, 2), (9855, 9855, 2), (9866, 9871, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12591, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12773, 2), (12783, 12830, 2), (12832, 12871, 2), (12880, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43052, 43052, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43263, 43263, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (68900, 68903, 0), (68969, 68973, 0), (69291, 69292, 0), (69370, 69375, 0), (69446, 69456, 0), (69506, 69509, 0), (69632, 69634, 0), (69688, 69702, 0), (69744, 69744, 0), (69747, 69748, 0), (69759, 69762, 0), (69808, 69818, 0), (69826, 69826, 0), (69888, 69890, 0), (69927, 69940, 0), (69957, 69958, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70089, 70092, 0), (70094, 70095, 0), (70188, 70199, 0), (70206, 70206, 0), (70209, 70209, 0), (70367, 70378, 0), (70400, 70403, 0), (70459, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70584, 70592, 0), (70594, 70594, 0), (70597, 70597, 0), (70599, 70602, 0), (70604, 70608, 0), (70610, 70610, 0), (70625, 70626, 0), (70709, 70726, 0), (70750, 70750, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (71724, 71738, 0), (71984, 71989, 0), (71991, 71992, 0), (71995, 71998, 0), (72000, 72000, 0), (72002, 72003, 0), (72145, 72151, 0), (72154, 72160, 0), (72164, 72164, 0), (72193, 72202, 0), (72243, 72249, 0), (72251, 72254, 0), (72263, 72263, 0), (72273, 72283, 0), (72330, 72345, 0), (72544, 72551, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (73009, 73014, 0), (73018, 73018, 0), (73020, 73021, 0), (73023, 73029, 0), (73031, 73031, 0), (73098, 73102, 0), (73104, 73105, 0), (73107, 73111, 0), (73459, 73462, 0), (73472, 73473, 0), (73475, 73475, 0), (73524, 73530, 0), (73534, 73538, 0), (73562, 73562, 0), (78896, 78912, 0), (78919, 78933, 0), (90398, 90415, 0), (92912, 92916, 0), (92976, 92982, 0), (94031, 94031, 0), (94033, 94087, 0), (94095, 94098, 0), (94176, 94179, 2), (94180, 94180, 0), (94192, 94193, 0), (94194, 94198, 2), (94208, 101589, 2), (101631, 101662, 2), (101760, 101874, 2), (110576, 110579, 2), (110581, 110587, 2), (110589, 110590, 2), (110592, 110882, 2), (110898, 110898, 2), (110928, 110930, 2), (110933, 110933, 2), (110948, 110951, 2), (110960, 111355, 2), (113821, 113822, 0), (113824, 113827, 0), (118528, 118573, 0), (118576, 118598, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (119552, 119638, 2), (119648, 119670, 2), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (123023, 123023, 0), (123184, 123190, 0), (123566, 123566, 0), (123628, 123631, 0), (124140, 124143, 0), (124398, 124399, 0), (124643, 124643, 0), (124646, 124646, 0), (124654, 124655, 0), (124661, 124661, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127584, 127589, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128725, 128728, 2), (128732, 128735, 2), (128747, 128748, 2), (128756, 128764, 2), (128992, 129003, 2), (129008, 129008, 2), (129292, 129338, 2), (129340, 129349, 2), (129351, 129535, 2), (129648, 129660, 2), (129664, 129674, 2), (129678, 129734, 2), (129736, 129736, 2), (129741, 129756, 2), (129759, 129770, 2), (129775, 129784, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "4.1.0", [ (0, 8, 0), (14, 31, 0), (127, 132, 0), (134, 159, 0), (768, 879, 0), (1155, 1158, 0), (1160, 1161, 0), (1425, 1465, 0), (1467, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1539, 0), (1552, 1557, 0), (1611, 1630, 0), (1648, 1648, 0), (1750, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2305, 2307, 0), (2364, 2364, 0), (2366, 2381, 0), (2385, 2388, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2672, 2673, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2883, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3330, 3331, 0), (3390, 3395, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3984, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4140, 4146, 0), (4150, 4153, 0), (4182, 4185, 0), (4352, 4441, 2), (4447, 4447, 2), (4448, 4607, 0), (4959, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6157, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (7616, 7619, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8427, 0), (9001, 9002, 2), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12588, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12727, 2), (12736, 12751, 2), (12784, 12830, 2), (12832, 12867, 2), (12880, 13054, 2), (13056, 19893, 2), (19968, 40891, 2), (40960, 42124, 2), (42128, 42182, 2), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (44032, 55203, 2), (55216, 57343, 0), (63744, 64045, 2), (64048, 64106, 2), (64112, 64217, 2), (64286, 64286, 0), (64976, 65007, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65059, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (65534, 65535, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (131070, 131071, 0), (131072, 196605, 2), (196606, 196607, 0), (196608, 262141, 2), (262142, 262143, 0), (327678, 327679, 0), (393214, 393215, 0), (458750, 458751, 0), (524286, 524287, 0), (589822, 589823, 0), (655358, 655359, 0), (720894, 720895, 0), (786430, 786431, 0), (851966, 851967, 0), (917502, 921599, 0), (983038, 983039, 0), (1048574, 1048575, 0), (1114110, 1114111, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "5.0.0", [ (0, 8, 0), (14, 31, 0), (127, 132, 0), (134, 159, 0), (768, 879, 0), (1155, 1158, 0), (1160, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1539, 0), (1552, 1557, 0), (1611, 1630, 0), (1648, 1648, 0), (1750, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2305, 2307, 0), (2364, 2364, 0), (2366, 2381, 0), (2385, 2388, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2672, 2673, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2883, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3330, 3331, 0), (3390, 3395, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3984, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4140, 4146, 0), (4150, 4153, 0), (4182, 4185, 0), (4352, 4441, 2), (4447, 4447, 2), (4448, 4607, 0), (4959, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6157, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7616, 7626, 0), (7678, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8431, 0), (9001, 9002, 2), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12588, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12727, 2), (12736, 12751, 2), (12784, 12830, 2), (12832, 12867, 2), (12880, 13054, 2), (13056, 19893, 2), (19968, 40891, 2), (40960, 42124, 2), (42128, 42182, 2), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (44032, 55203, 2), (55216, 57343, 0), (63744, 64045, 2), (64048, 64106, 2), (64112, 64217, 2), (64286, 64286, 0), (64976, 65007, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65059, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (65534, 65535, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (131070, 131071, 0), (131072, 196605, 2), (196606, 196607, 0), (196608, 262141, 2), (262142, 262143, 0), (327678, 327679, 0), (393214, 393215, 0), (458750, 458751, 0), (524286, 524287, 0), (589822, 589823, 0), (655358, 655359, 0), (720894, 720895, 0), (786430, 786431, 0), (851966, 851967, 0), (917502, 921599, 0), (983038, 983039, 0), (1048574, 1048575, 0), (1114110, 1114111, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "5.1.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1539, 0), (1552, 1562, 0), (1611, 1630, 0), (1648, 1648, 0), (1750, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2305, 2307, 0), (2364, 2364, 0), (2366, 2381, 0), (2385, 2388, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3330, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3984, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4352, 4441, 2), (4447, 4447, 2), (4448, 4607, 0), (4959, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6157, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7082, 0), (7204, 7223, 0), (7616, 7654, 0), (7678, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12727, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12867, 2), (12880, 13054, 2), (13056, 19893, 2), (19968, 40899, 2), (40960, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42620, 42621, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43302, 43309, 0), (43335, 43347, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64045, 2), (64048, 64106, 2), (64112, 64217, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65062, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "5.2.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1539, 0), (1552, 1562, 0), (1611, 1630, 0), (1648, 1648, 0), (1750, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2304, 2307, 0), (2364, 2364, 0), (2366, 2382, 0), (2385, 2389, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3330, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3984, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4959, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6157, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7082, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7410, 0), (7616, 7654, 0), (7677, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11503, 11505, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12727, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42620, 42621, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43643, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65062, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (69760, 69762, 0), (69808, 69818, 0), (69821, 69821, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (127488, 127488, 2), (127504, 127537, 2), (127552, 127560, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "6.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1539, 0), (1552, 1562, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1757, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2304, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3330, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6157, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7082, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7410, 0), (7616, 7654, 0), (7676, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42620, 42621, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43643, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65062, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (69632, 69634, 0), (69688, 69702, 0), (69760, 69762, 0), (69808, 69818, 0), (69821, 69821, 0), (110592, 110593, 2), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (127488, 127490, 2), (127504, 127546, 2), (127552, 127560, 2), (127568, 127569, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "6.1.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1540, 0), (1552, 1562, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1757, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2276, 2302, 0), (2304, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3330, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6157, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7616, 7654, 0), (7676, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42655, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43643, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65062, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (69632, 69634, 0), (69688, 69702, 0), (69760, 69762, 0), (69808, 69818, 0), (69821, 69821, 0), (69888, 69890, 0), (69927, 69940, 0), (70016, 70018, 0), (70067, 70080, 0), (71339, 71351, 0), (94033, 94078, 0), (94095, 94098, 0), (110592, 110593, 2), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (127488, 127490, 2), (127504, 127546, 2), (127552, 127560, 2), (127568, 127569, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "6.2.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1540, 0), (1552, 1562, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1757, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2276, 2302, 0), (2304, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3330, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6157, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7616, 7654, 0), (7676, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42655, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43643, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65062, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (69632, 69634, 0), (69688, 69702, 0), (69760, 69762, 0), (69808, 69818, 0), (69821, 69821, 0), (69888, 69890, 0), (69927, 69940, 0), (70016, 70018, 0), (70067, 70080, 0), (71339, 71351, 0), (94033, 94078, 0), (94095, 94098, 0), (110592, 110593, 2), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (127488, 127490, 2), (127504, 127546, 2), (127552, 127560, 2), (127568, 127569, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "6.3.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1540, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1757, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2276, 2302, 0), (2304, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3073, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3202, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3330, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7616, 7654, 0), (7676, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42655, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43643, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65062, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (69632, 69634, 0), (69688, 69702, 0), (69760, 69762, 0), (69808, 69818, 0), (69821, 69821, 0), (69888, 69890, 0), (69927, 69940, 0), (70016, 70018, 0), (70067, 70080, 0), (71339, 71351, 0), (94033, 94078, 0), (94095, 94098, 0), (110592, 110593, 2), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (127488, 127490, 2), (127504, 127546, 2), (127552, 127560, 2), (127568, 127569, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "����", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "7.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1541, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1757, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2276, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3329, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6576, 6592, 0), (6600, 6601, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6846, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7416, 7417, 0), (7616, 7669, 0), (7676, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42655, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65069, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69821, 69821, 0), (69888, 69890, 0), (69927, 69940, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70188, 70199, 0), (70367, 70378, 0), (70401, 70403, 0), (70460, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71216, 71232, 0), (71339, 71351, 0), (92912, 92916, 0), (92976, 92982, 0), (94033, 94078, 0), (94095, 94098, 0), (110592, 110593, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (125136, 125142, 0), (127488, 127490, 2), (127504, 127546, 2), (127552, 127560, 2), (127568, 127569, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "8.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1536, 1541, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1757, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1807, 1807, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3329, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6846, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7416, 7417, 0), (7616, 7669, 0), (7676, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (9001, 9002, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43204, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69821, 69821, 0), (69888, 69890, 0), (69927, 69940, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70090, 70092, 0), (70188, 70199, 0), (70367, 70378, 0), (70400, 70403, 0), (70460, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (92912, 92916, 0), (92976, 92982, 0), (94033, 94078, 0), (94095, 94098, 0), (110592, 110593, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (125136, 125142, 0), (127488, 127490, 2), (127504, 127546, 2), (127552, 127560, 2), (127568, 127569, 2), (127995, 127999, 0), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598# Auto generated by tools/make_width_tables.py# Data from wcwidth project (https://github.com/jquast/wcwidth)
from rich.cells import CellTable
cell_table = CellTable( "9.0.0", [ (0, 0, 0), (768, 879, 0), (1155, 1161, 0), (1425, 1469, 0), (1471, 1471, 0), (1473, 1474, 0), (1476, 1477, 0), (1479, 1479, 0), (1552, 1562, 0), (1564, 1564, 0), (1611, 1631, 0), (1648, 1648, 0), (1750, 1756, 0), (1759, 1764, 0), (1767, 1768, 0), (1770, 1773, 0), (1809, 1809, 0), (1840, 1866, 0), (1958, 1968, 0), (2027, 2035, 0), (2070, 2073, 0), (2075, 2083, 0), (2085, 2087, 0), (2089, 2093, 0), (2137, 2139, 0), (2260, 2273, 0), (2275, 2307, 0), (2362, 2364, 0), (2366, 2383, 0), (2385, 2391, 0), (2402, 2403, 0), (2433, 2435, 0), (2492, 2492, 0), (2494, 2500, 0), (2503, 2504, 0), (2507, 2509, 0), (2519, 2519, 0), (2530, 2531, 0), (2561, 2563, 0), (2620, 2620, 0), (2622, 2626, 0), (2631, 2632, 0), (2635, 2637, 0), (2641, 2641, 0), (2672, 2673, 0), (2677, 2677, 0), (2689, 2691, 0), (2748, 2748, 0), (2750, 2757, 0), (2759, 2761, 0), (2763, 2765, 0), (2786, 2787, 0), (2817, 2819, 0), (2876, 2876, 0), (2878, 2884, 0), (2887, 2888, 0), (2891, 2893, 0), (2902, 2903, 0), (2914, 2915, 0), (2946, 2946, 0), (3006, 3010, 0), (3014, 3016, 0), (3018, 3021, 0), (3031, 3031, 0), (3072, 3075, 0), (3134, 3140, 0), (3142, 3144, 0), (3146, 3149, 0), (3157, 3158, 0), (3170, 3171, 0), (3201, 3203, 0), (3260, 3260, 0), (3262, 3268, 0), (3270, 3272, 0), (3274, 3277, 0), (3285, 3286, 0), (3298, 3299, 0), (3329, 3331, 0), (3390, 3396, 0), (3398, 3400, 0), (3402, 3405, 0), (3415, 3415, 0), (3426, 3427, 0), (3458, 3459, 0), (3530, 3530, 0), (3535, 3540, 0), (3542, 3542, 0), (3544, 3551, 0), (3570, 3571, 0), (3633, 3633, 0), (3636, 3642, 0), (3655, 3662, 0), (3761, 3761, 0), (3764, 3769, 0), (3771, 3772, 0), (3784, 3789, 0), (3864, 3865, 0), (3893, 3893, 0), (3895, 3895, 0), (3897, 3897, 0), (3902, 3903, 0), (3953, 3972, 0), (3974, 3975, 0), (3981, 3991, 0), (3993, 4028, 0), (4038, 4038, 0), (4139, 4158, 0), (4182, 4185, 0), (4190, 4192, 0), (4194, 4196, 0), (4199, 4205, 0), (4209, 4212, 0), (4226, 4237, 0), (4239, 4239, 0), (4250, 4253, 0), (4352, 4447, 2), (4448, 4607, 0), (4957, 4959, 0), (5906, 5908, 0), (5938, 5940, 0), (5970, 5971, 0), (6002, 6003, 0), (6068, 6099, 0), (6109, 6109, 0), (6155, 6158, 0), (6277, 6278, 0), (6313, 6313, 0), (6432, 6443, 0), (6448, 6459, 0), (6679, 6683, 0), (6741, 6750, 0), (6752, 6780, 0), (6783, 6783, 0), (6832, 6846, 0), (6912, 6916, 0), (6964, 6980, 0), (7019, 7027, 0), (7040, 7042, 0), (7073, 7085, 0), (7142, 7155, 0), (7204, 7223, 0), (7376, 7378, 0), (7380, 7400, 0), (7405, 7405, 0), (7410, 7412, 0), (7416, 7417, 0), (7616, 7669, 0), (7675, 7679, 0), (8203, 8207, 0), (8232, 8238, 0), (8288, 8303, 0), (8400, 8432, 0), (8986, 8987, 2), (9001, 9002, 2), (9193, 9196, 2), (9200, 9200, 2), (9203, 9203, 2), (9725, 9726, 2), (9748, 9749, 2), (9800, 9811, 2), (9855, 9855, 2), (9875, 9875, 2), (9889, 9889, 2), (9898, 9899, 2), (9917, 9918, 2), (9924, 9925, 2), (9934, 9934, 2), (9940, 9940, 2), (9962, 9962, 2), (9970, 9971, 2), (9973, 9973, 2), (9978, 9978, 2), (9981, 9981, 2), (9989, 9989, 2), (9994, 9995, 2), (10024, 10024, 2), (10060, 10060, 2), (10062, 10062, 2), (10067, 10069, 2), (10071, 10071, 2), (10133, 10135, 2), (10160, 10160, 2), (10175, 10175, 2), (11035, 11036, 2), (11088, 11088, 2), (11093, 11093, 2), (11503, 11505, 0), (11647, 11647, 0), (11744, 11775, 0), (11904, 11929, 2), (11931, 12019, 2), (12032, 12245, 2), (12272, 12283, 2), (12288, 12329, 2), (12330, 12335, 0), (12336, 12350, 2), (12353, 12438, 2), (12441, 12442, 0), (12443, 12543, 2), (12549, 12589, 2), (12593, 12643, 2), (12644, 12644, 0), (12645, 12686, 2), (12688, 12730, 2), (12736, 12771, 2), (12784, 12830, 2), (12832, 12871, 2), (12880, 13054, 2), (13056, 19903, 2), (19968, 42124, 2), (42128, 42182, 2), (42607, 42610, 0), (42612, 42621, 0), (42654, 42655, 0), (42736, 42737, 0), (43010, 43010, 0), (43014, 43014, 0), (43019, 43019, 0), (43043, 43047, 0), (43136, 43137, 0), (43188, 43205, 0), (43232, 43249, 0), (43302, 43309, 0), (43335, 43347, 0), (43360, 43388, 2), (43392, 43395, 0), (43443, 43456, 0), (43493, 43493, 0), (43561, 43574, 0), (43587, 43587, 0), (43596, 43597, 0), (43643, 43645, 0), (43696, 43696, 0), (43698, 43700, 0), (43703, 43704, 0), (43710, 43711, 0), (43713, 43713, 0), (43755, 43759, 0), (43765, 43766, 0), (44003, 44010, 0), (44012, 44013, 0), (44032, 55203, 2), (55216, 55295, 0), (63744, 64255, 2), (64286, 64286, 0), (65024, 65039, 0), (65040, 65049, 2), (65056, 65071, 0), (65072, 65106, 2), (65108, 65126, 2), (65128, 65131, 2), (65279, 65279, 0), (65281, 65376, 2), (65440, 65440, 0), (65504, 65510, 2), (65520, 65531, 0), (66045, 66045, 0), (66272, 66272, 0), (66422, 66426, 0), (68097, 68099, 0), (68101, 68102, 0), (68108, 68111, 0), (68152, 68154, 0), (68159, 68159, 0), (68325, 68326, 0), (69632, 69634, 0), (69688, 69702, 0), (69759, 69762, 0), (69808, 69818, 0), (69888, 69890, 0), (69927, 69940, 0), (70003, 70003, 0), (70016, 70018, 0), (70067, 70080, 0), (70090, 70092, 0), (70188, 70199, 0), (70206, 70206, 0), (70367, 70378, 0), (70400, 70403, 0), (70460, 70460, 0), (70462, 70468, 0), (70471, 70472, 0), (70475, 70477, 0), (70487, 70487, 0), (70498, 70499, 0), (70502, 70508, 0), (70512, 70516, 0), (70709, 70726, 0), (70832, 70851, 0), (71087, 71093, 0), (71096, 71104, 0), (71132, 71133, 0), (71216, 71232, 0), (71339, 71351, 0), (71453, 71467, 0), (72751, 72758, 0), (72760, 72767, 0), (72850, 72871, 0), (72873, 72886, 0), (92912, 92916, 0), (92976, 92982, 0), (94033, 94078, 0), (94095, 94098, 0), (94176, 94176, 2), (94208, 100332, 2), (100352, 101106, 2), (110592, 110593, 2), (113821, 113822, 0), (113824, 113827, 0), (119141, 119145, 0), (119149, 119170, 0), (119173, 119179, 0), (119210, 119213, 0), (119362, 119364, 0), (121344, 121398, 0), (121403, 121452, 0), (121461, 121461, 0), (121476, 121476, 0), (121499, 121503, 0), (121505, 121519, 0), (122880, 122886, 0), (122888, 122904, 0), (122907, 122913, 0), (122915, 122916, 0), (122918, 122922, 0), (125136, 125142, 0), (125252, 125258, 0), (126980, 126980, 2), (127183, 127183, 2), (127374, 127374, 2), (127377, 127386, 2), (127488, 127490, 2), (127504, 127547, 2), (127552, 127560, 2), (127568, 127569, 2), (127744, 127776, 2), (127789, 127797, 2), (127799, 127868, 2), (127870, 127891, 2), (127904, 127946, 2), (127951, 127955, 2), (127968, 127984, 2), (127988, 127988, 2), (127992, 127994, 2), (127995, 127999, 0), (128000, 128062, 2), (128064, 128064, 2), (128066, 128252, 2), (128255, 128317, 2), (128331, 128334, 2), (128336, 128359, 2), (128378, 128378, 2), (128405, 128406, 2), (128420, 128420, 2), (128507, 128591, 2), (128640, 128709, 2), (128716, 128716, 2), (128720, 128722, 2), (128747, 128748, 2), (128756, 128758, 2), (129296, 129310, 2), (129312, 129319, 2), (129328, 129328, 2), (129331, 129342, 2), (129344, 129355, 2), (129360, 129374, 2), (129408, 129425, 2), (129472, 129472, 2), (131072, 196605, 2), (196608, 262141, 2), (917504, 921599, 0), ], frozenset( [ "#", "*", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌨", "⏏", "⏭", "⏮", "⏯", "⏱", "⏲", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♀", "♂", "♟", "♠", "♣", "♥", "♦", "♨", "♻", "♾", "⚒", "⚔", "⚕", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚧", "⚰", "⚱", "⛈", "⛏", "⛑", "⛓", "⛩", "⛰", "⛱", "⛴", "⛷", "⛸", "⛹", "✂", "✈", "✉", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✳", "✴", "❄", "❇", "❣", "❤", "➡", "⤴", "⤵", "⬅", "⬆", "⬇", "🅰", "🅱", "🅾", "🅿", "🌡", "🌤", "🌥", "🌦", "🌧", "🌨", "🌩", "🌪", "🌫", "🌬", "🌶", "🍽", "🎖", "🎗", "🎙", "🎚", "🎛", "🎞", "🎟", "🏋", "🏌", "🏍", "🏎", "🏔", "🏕", "🏖", "🏗", "🏘", "🏙", "🏚", "🏛", "🏜", "🏝", "🏞", "🏟", "🏳", "🏵", "🏷", "🐿", "👁", "📽", "🕉", "🕊", "🕯", "🕰", "🕳", "🕴", "🕵", "🕶", "🕷", "🕸", "🕹", "🖇", "🖊", "🖋", "🖌", "🖍", "🖐", "🖥", "🖨", "🖱", "🖲", "🖼", "🗂", "🗃", "🗄", "🗑", "🗒", "🗓", "🗜", "🗝", "🗞", "🗡", "🗣", "🗨", "🗯", "🗳", "🗺", "🛋", "🛍", "🛎", "🛏", "🛠", "🛡", "🛢", "🛣", "🛤", "🛥", "🛩", "🛰", "🛳", ] ),)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661"""Light wrapper around the Win32 Console API - this module should only be imported on Windows
The API that this module wraps is documented at https://docs.microsoft.com/en-us/windows/console/console-functions"""
import ctypesimport sysfrom typing import Any
windll: Any = Noneif sys.platform == "win32": windll = ctypes.LibraryLoader(ctypes.WinDLL)else: raise ImportError(f"{__name__} can only be imported on Windows")
import timefrom ctypes import Structure, byref, wintypesfrom typing import IO, NamedTuple, Type, cast
from rich.color import ColorSystemfrom rich.style import Style
STDOUT = -11ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4
COORD = wintypes._COORD
class LegacyWindowsError(Exception): pass
class WindowsCoordinates(NamedTuple): """Coordinates in the Windows Console API are (y, x), not (x, y). This class is intended to prevent that confusion. Rows and columns are indexed from 0. This class can be used in place of wintypes._COORD in arguments and argtypes. """
row: int col: int
@classmethod def from_param(cls, value: "WindowsCoordinates") -> COORD: """Converts a WindowsCoordinates into a wintypes _COORD structure. This classmethod is internally called by ctypes to perform the conversion.
Args: value (WindowsCoordinates): The input coordinates to convert.
Returns: wintypes._COORD: The converted coordinates struct. """ return COORD(value.col, value.row)
class CONSOLE_SCREEN_BUFFER_INFO(Structure): _fields_ = [ ("dwSize", COORD), ("dwCursorPosition", COORD), ("wAttributes", wintypes.WORD), ("srWindow", wintypes.SMALL_RECT), ("dwMaximumWindowSize", COORD), ]
class CONSOLE_CURSOR_INFO(ctypes.Structure): _fields_ = [("dwSize", wintypes.DWORD), ("bVisible", wintypes.BOOL)]
_GetStdHandle = windll.kernel32.GetStdHandle_GetStdHandle.argtypes = [ wintypes.DWORD,]_GetStdHandle.restype = wintypes.HANDLE
def GetStdHandle(handle: int = STDOUT) -> wintypes.HANDLE: """Retrieves a handle to the specified standard device (standard input, standard output, or standard error).
Args: handle (int): Integer identifier for the handle. Defaults to -11 (stdout).
Returns: wintypes.HANDLE: The handle """ return cast(wintypes.HANDLE, _GetStdHandle(handle))
_GetConsoleMode = windll.kernel32.GetConsoleMode_GetConsoleMode.argtypes = [wintypes.HANDLE, wintypes.LPDWORD]_GetConsoleMode.restype = wintypes.BOOL
def GetConsoleMode(std_handle: wintypes.HANDLE) -> int: """Retrieves the current input mode of a console's input buffer or the current output mode of a console screen buffer.
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
Raises: LegacyWindowsError: If any error occurs while calling the Windows console API.
Returns: int: Value representing the current console mode as documented at https://docs.microsoft.com/en-us/windows/console/getconsolemode#parameters """
console_mode = wintypes.DWORD() success = bool(_GetConsoleMode(std_handle, console_mode)) if not success: raise LegacyWindowsError("Unable to get legacy Windows Console Mode") return console_mode.value
_FillConsoleOutputCharacterW = windll.kernel32.FillConsoleOutputCharacterW_FillConsoleOutputCharacterW.argtypes = [ wintypes.HANDLE, ctypes.c_char, wintypes.DWORD, cast(Type[COORD], WindowsCoordinates), ctypes.POINTER(wintypes.DWORD),]_FillConsoleOutputCharacterW.restype = wintypes.BOOL
def FillConsoleOutputCharacter( std_handle: wintypes.HANDLE, char: str, length: int, start: WindowsCoordinates,) -> int: """Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. char (str): The character to write. Must be a string of length 1. length (int): The number of times to write the character. start (WindowsCoordinates): The coordinates to start writing at.
Returns: int: The number of characters written. """ character = ctypes.c_char(char.encode()) num_characters = wintypes.DWORD(length) num_written = wintypes.DWORD(0) _FillConsoleOutputCharacterW( std_handle, character, num_characters, start, byref(num_written), ) return num_written.value
_FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute_FillConsoleOutputAttribute.argtypes = [ wintypes.HANDLE, wintypes.WORD, wintypes.DWORD, cast(Type[COORD], WindowsCoordinates), ctypes.POINTER(wintypes.DWORD),]_FillConsoleOutputAttribute.restype = wintypes.BOOL
def FillConsoleOutputAttribute( std_handle: wintypes.HANDLE, attributes: int, length: int, start: WindowsCoordinates,) -> int: """Sets the character attributes for a specified number of character cells, beginning at the specified coordinates in a screen buffer.
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. attributes (int): Integer value representing the foreground and background colours of the cells. length (int): The number of cells to set the output attribute of. start (WindowsCoordinates): The coordinates of the first cell whose attributes are to be set.
Returns: int: The number of cells whose attributes were actually set. """ num_cells = wintypes.DWORD(length) style_attrs = wintypes.WORD(attributes) num_written = wintypes.DWORD(0) _FillConsoleOutputAttribute( std_handle, style_attrs, num_cells, start, byref(num_written) ) return num_written.value
_SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute_SetConsoleTextAttribute.argtypes = [ wintypes.HANDLE, wintypes.WORD,]_SetConsoleTextAttribute.restype = wintypes.BOOL
def SetConsoleTextAttribute( std_handle: wintypes.HANDLE, attributes: wintypes.WORD) -> bool: """Set the colour attributes for all text written after this function is called.
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. attributes (int): Integer value representing the foreground and background colours.
Returns: bool: True if the attribute was set successfully, otherwise False. """ return bool(_SetConsoleTextAttribute(std_handle, attributes))
_GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo_GetConsoleScreenBufferInfo.argtypes = [ wintypes.HANDLE, ctypes.POINTER(CONSOLE_SCREEN_BUFFER_INFO),]_GetConsoleScreenBufferInfo.restype = wintypes.BOOL
def GetConsoleScreenBufferInfo( std_handle: wintypes.HANDLE,) -> CONSOLE_SCREEN_BUFFER_INFO: """Retrieves information about the specified console screen buffer.
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
Returns: CONSOLE_SCREEN_BUFFER_INFO: A CONSOLE_SCREEN_BUFFER_INFO ctype struct contain information about screen size, cursor position, colour attributes, and more.""" console_screen_buffer_info = CONSOLE_SCREEN_BUFFER_INFO() _GetConsoleScreenBufferInfo(std_handle, byref(console_screen_buffer_info)) return console_screen_buffer_info
_SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition_SetConsoleCursorPosition.argtypes = [ wintypes.HANDLE, cast(Type[COORD], WindowsCoordinates),]_SetConsoleCursorPosition.restype = wintypes.BOOL
def SetConsoleCursorPosition( std_handle: wintypes.HANDLE, coords: WindowsCoordinates) -> bool: """Set the position of the cursor in the console screen
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. coords (WindowsCoordinates): The coordinates to move the cursor to.
Returns: bool: True if the function succeeds, otherwise False. """ return bool(_SetConsoleCursorPosition(std_handle, coords))
_GetConsoleCursorInfo = windll.kernel32.GetConsoleCursorInfo_GetConsoleCursorInfo.argtypes = [ wintypes.HANDLE, ctypes.POINTER(CONSOLE_CURSOR_INFO),]_GetConsoleCursorInfo.restype = wintypes.BOOL
def GetConsoleCursorInfo( std_handle: wintypes.HANDLE, cursor_info: CONSOLE_CURSOR_INFO) -> bool: """Get the cursor info - used to get cursor visibility and width
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct that receives information about the console's cursor.
Returns: bool: True if the function succeeds, otherwise False. """ return bool(_GetConsoleCursorInfo(std_handle, byref(cursor_info)))
_SetConsoleCursorInfo = windll.kernel32.SetConsoleCursorInfo_SetConsoleCursorInfo.argtypes = [ wintypes.HANDLE, ctypes.POINTER(CONSOLE_CURSOR_INFO),]_SetConsoleCursorInfo.restype = wintypes.BOOL
def SetConsoleCursorInfo( std_handle: wintypes.HANDLE, cursor_info: CONSOLE_CURSOR_INFO) -> bool: """Set the cursor info - used for adjusting cursor visibility and width
Args: std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct containing the new cursor info.
Returns: bool: True if the function succeeds, otherwise False. """ return bool(_SetConsoleCursorInfo(std_handle, byref(cursor_info)))
_SetConsoleTitle = windll.kernel32.SetConsoleTitleW_SetConsoleTitle.argtypes = [wintypes.LPCWSTR]_SetConsoleTitle.restype = wintypes.BOOL
def SetConsoleTitle(title: str) -> bool: """Sets the title of the current console window
Args: title (str): The new title of the console window.
Returns: bool: True if the function succeeds, otherwise False. """ return bool(_SetConsoleTitle(title))
class LegacyWindowsTerm: """This class allows interaction with the legacy Windows Console API. It should only be used in the context of environments where virtual terminal processing is not available. However, if it is used in a Windows environment, the entire API should work.
Args: file (IO[str]): The file which the Windows Console API HANDLE is retrieved from, defaults to sys.stdout. """
BRIGHT_BIT = 8
# Indices are ANSI color numbers, values are the corresponding Windows Console API color numbers ANSI_TO_WINDOWS = [ 0, # black The Windows colours are defined in wincon.h as follows: 4, # red define FOREGROUND_BLUE 0x0001 -- 0000 0001 2, # green define FOREGROUND_GREEN 0x0002 -- 0000 0010 6, # yellow define FOREGROUND_RED 0x0004 -- 0000 0100 1, # blue define FOREGROUND_INTENSITY 0x0008 -- 0000 1000 5, # magenta define BACKGROUND_BLUE 0x0010 -- 0001 0000 3, # cyan define BACKGROUND_GREEN 0x0020 -- 0010 0000 7, # white define BACKGROUND_RED 0x0040 -- 0100 0000 8, # bright black (grey) define BACKGROUND_INTENSITY 0x0080 -- 1000 0000 12, # bright red 10, # bright green 14, # bright yellow 9, # bright blue 13, # bright magenta 11, # bright cyan 15, # bright white ]
def __init__(self, file: "IO[str]") -> None: handle = GetStdHandle(STDOUT) self._handle = handle default_text = GetConsoleScreenBufferInfo(handle).wAttributes self._default_text = default_text
self._default_fore = default_text & 7 self._default_back = (default_text >> 4) & 7 self._default_attrs = self._default_fore | (self._default_back << 4)
self._file = file self.write = file.write self.flush = file.flush
@property def cursor_position(self) -> WindowsCoordinates: """Returns the current position of the cursor (0-based)
Returns: WindowsCoordinates: The current cursor position. """ coord: COORD = GetConsoleScreenBufferInfo(self._handle).dwCursorPosition return WindowsCoordinates(row=coord.Y, col=coord.X)
@property def screen_size(self) -> WindowsCoordinates: """Returns the current size of the console screen buffer, in character columns and rows
Returns: WindowsCoordinates: The width and height of the screen as WindowsCoordinates. """ screen_size: COORD = GetConsoleScreenBufferInfo(self._handle).dwSize return WindowsCoordinates(row=screen_size.Y, col=screen_size.X)
def write_text(self, text: str) -> None: """Write text directly to the terminal without any modification of styles
Args: text (str): The text to write to the console """ self.write(text) self.flush()
def write_styled(self, text: str, style: Style) -> None: """Write styled text to the terminal.
Args: text (str): The text to write style (Style): The style of the text """ color = style.color bgcolor = style.bgcolor if style.reverse: color, bgcolor = bgcolor, color
if color: fore = color.downgrade(ColorSystem.WINDOWS).number fore = fore if fore is not None else 7 # Default to ANSI 7: White if style.bold: fore = fore | self.BRIGHT_BIT if style.dim: fore = fore & ~self.BRIGHT_BIT fore = self.ANSI_TO_WINDOWS[fore] else: fore = self._default_fore
if bgcolor: back = bgcolor.downgrade(ColorSystem.WINDOWS).number back = back if back is not None else 0 # Default to ANSI 0: Black back = self.ANSI_TO_WINDOWS[back] else: back = self._default_back
assert fore is not None assert back is not None
SetConsoleTextAttribute( self._handle, attributes=ctypes.c_ushort(fore | (back << 4)) ) self.write_text(text) SetConsoleTextAttribute(self._handle, attributes=self._default_text)
def move_cursor_to(self, new_position: WindowsCoordinates) -> None: """Set the position of the cursor
Args: new_position (WindowsCoordinates): The WindowsCoordinates representing the new position of the cursor. """ if new_position.col < 0 or new_position.row < 0: return SetConsoleCursorPosition(self._handle, coords=new_position)
def erase_line(self) -> None: """Erase all content on the line the cursor is currently located at""" screen_size = self.screen_size cursor_position = self.cursor_position cells_to_erase = screen_size.col start_coordinates = WindowsCoordinates(row=cursor_position.row, col=0) FillConsoleOutputCharacter( self._handle, " ", length=cells_to_erase, start=start_coordinates ) FillConsoleOutputAttribute( self._handle, self._default_attrs, length=cells_to_erase, start=start_coordinates, )
def erase_end_of_line(self) -> None: """Erase all content from the cursor position to the end of that line""" cursor_position = self.cursor_position cells_to_erase = self.screen_size.col - cursor_position.col FillConsoleOutputCharacter( self._handle, " ", length=cells_to_erase, start=cursor_position ) FillConsoleOutputAttribute( self._handle, self._default_attrs, length=cells_to_erase, start=cursor_position, )
def erase_start_of_line(self) -> None: """Erase all content from the cursor position to the start of that line""" row, col = self.cursor_position start = WindowsCoordinates(row, 0) FillConsoleOutputCharacter(self._handle, " ", length=col, start=start) FillConsoleOutputAttribute( self._handle, self._default_attrs, length=col, start=start )
def move_cursor_up(self) -> None: """Move the cursor up a single cell""" cursor_position = self.cursor_position SetConsoleCursorPosition( self._handle, coords=WindowsCoordinates( row=cursor_position.row - 1, col=cursor_position.col ), )
def move_cursor_down(self) -> None: """Move the cursor down a single cell""" cursor_position = self.cursor_position SetConsoleCursorPosition( self._handle, coords=WindowsCoordinates( row=cursor_position.row + 1, col=cursor_position.col, ), )
def move_cursor_forward(self) -> None: """Move the cursor forward a single cell. Wrap to the next line if required.""" row, col = self.cursor_position if col == self.screen_size.col - 1: row += 1 col = 0 else: col += 1 SetConsoleCursorPosition( self._handle, coords=WindowsCoordinates(row=row, col=col) )
def move_cursor_to_column(self, column: int) -> None: """Move cursor to the column specified by the zero-based column index, staying on the same row
Args: column (int): The zero-based column index to move the cursor to. """ row, _ = self.cursor_position SetConsoleCursorPosition(self._handle, coords=WindowsCoordinates(row, column))
def move_cursor_backward(self) -> None: """Move the cursor backward a single cell. Wrap to the previous line if required.""" row, col = self.cursor_position if col == 0: row -= 1 col = self.screen_size.col - 1 else: col -= 1 SetConsoleCursorPosition( self._handle, coords=WindowsCoordinates(row=row, col=col) )
def hide_cursor(self) -> None: """Hide the cursor""" current_cursor_size = self._get_cursor_size() invisible_cursor = CONSOLE_CURSOR_INFO(dwSize=current_cursor_size, bVisible=0) SetConsoleCursorInfo(self._handle, cursor_info=invisible_cursor)
def show_cursor(self) -> None: """Show the cursor""" current_cursor_size = self._get_cursor_size() visible_cursor = CONSOLE_CURSOR_INFO(dwSize=current_cursor_size, bVisible=1) SetConsoleCursorInfo(self._handle, cursor_info=visible_cursor)
def set_title(self, title: str) -> None: """Set the title of the terminal window
Args: title (str): The new title of the console window """ assert len(title) < 255, "Console title must be less than 255 characters" SetConsoleTitle(title)
def _get_cursor_size(self) -> int: """Get the percentage of the character cell that is filled by the cursor""" cursor_info = CONSOLE_CURSOR_INFO() GetConsoleCursorInfo(self._handle, cursor_info=cursor_info) return int(cursor_info.dwSize)
if __name__ == "__main__": handle = GetStdHandle()
from rich.console import Console
console = Console()
term = LegacyWindowsTerm(sys.stdout) term.set_title("Win32 Console Examples")
style = Style(color="black", bgcolor="red")
heading = Style.parse("black on green")
# Check colour output console.rule("Checking colour output") console.print("[on red]on red!") console.print("[blue]blue!") console.print("[yellow]yellow!") console.print("[bold yellow]bold yellow!") console.print("[bright_yellow]bright_yellow!") console.print("[dim bright_yellow]dim bright_yellow!") console.print("[italic cyan]italic cyan!") console.print("[bold white on blue]bold white on blue!") console.print("[reverse bold white on blue]reverse bold white on blue!") console.print("[bold black on cyan]bold black on cyan!") console.print("[black on green]black on green!") console.print("[blue on green]blue on green!") console.print("[white on black]white on black!") console.print("[black on white]black on white!") console.print("[#1BB152 on #DA812D]#1BB152 on #DA812D!")
# Check cursor movement console.rule("Checking cursor movement") console.print() term.move_cursor_backward() term.move_cursor_backward() term.write_text("went back and wrapped to prev line") time.sleep(1) term.move_cursor_up() term.write_text("we go up") time.sleep(1) term.move_cursor_down() term.write_text("and down") time.sleep(1) term.move_cursor_up() term.move_cursor_backward() term.move_cursor_backward() term.write_text("we went up and back 2") time.sleep(1) term.move_cursor_down() term.move_cursor_backward() term.move_cursor_backward() term.write_text("we went down and back 2") time.sleep(1)
# Check erasing of lines term.hide_cursor() console.print() console.rule("Checking line erasing") console.print("\n...Deleting to the start of the line...") term.write_text("The red arrow shows the cursor location, and direction of erase") time.sleep(1) term.move_cursor_to_column(16) term.write_styled("<", Style.parse("black on red")) term.move_cursor_backward() time.sleep(1) term.erase_start_of_line() time.sleep(1)
console.print("\n\n...And to the end of the line...") term.write_text("The red arrow shows the cursor location, and direction of erase") time.sleep(1)
term.move_cursor_to_column(16) term.write_styled(">", Style.parse("black on red")) time.sleep(1) term.erase_end_of_line() time.sleep(1)
console.print("\n\n...Now the whole line will be erased...") term.write_styled("I'm going to disappear!", style=Style.parse("black on cyan")) time.sleep(1) term.erase_line()
term.show_cursor() print("\n")1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071import sysfrom dataclasses import dataclass
@dataclassclass WindowsConsoleFeatures: """Windows features available."""
vt: bool = False """The console supports VT codes.""" truecolor: bool = False """The console supports truecolor."""
try: import ctypes from ctypes import LibraryLoader
if sys.platform == "win32": windll = LibraryLoader(ctypes.WinDLL) else: windll = None raise ImportError("Not windows")
from rich._win32_console import ( ENABLE_VIRTUAL_TERMINAL_PROCESSING, GetConsoleMode, GetStdHandle, LegacyWindowsError, )
except (AttributeError, ImportError, ValueError): # Fallback if we can't load the Windows DLL def get_windows_console_features() -> WindowsConsoleFeatures: features = WindowsConsoleFeatures() return features
else:
def get_windows_console_features() -> WindowsConsoleFeatures: """Get windows console features.
Returns: WindowsConsoleFeatures: An instance of WindowsConsoleFeatures. """ handle = GetStdHandle() try: console_mode = GetConsoleMode(handle) success = True except LegacyWindowsError: console_mode = 0 success = False vt = bool(success and console_mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) truecolor = False if vt: win_version = sys.getwindowsversion() truecolor = win_version.major > 10 or ( win_version.major == 10 and win_version.build >= 15063 ) features = WindowsConsoleFeatures(vt=vt, truecolor=truecolor) return features
if __name__ == "__main__": import platform
features = get_windows_console_features() from rich import print
print(f'platform="{platform.system()}"') print(repr(features))1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556from typing import Iterable, Sequence, Tuple, cast
from rich._win32_console import LegacyWindowsTerm, WindowsCoordinatesfrom rich.segment import ControlCode, ControlType, Segment
def legacy_windows_render(buffer: Iterable[Segment], term: LegacyWindowsTerm) -> None: """Makes appropriate Windows Console API calls based on the segments in the buffer.
Args: buffer (Iterable[Segment]): Iterable of Segments to convert to Win32 API calls. term (LegacyWindowsTerm): Used to call the Windows Console API. """ for text, style, control in buffer: if not control: if style: term.write_styled(text, style) else: term.write_text(text) else: control_codes: Sequence[ControlCode] = control for control_code in control_codes: control_type = control_code[0] if control_type == ControlType.CURSOR_MOVE_TO: _, x, y = cast(Tuple[ControlType, int, int], control_code) term.move_cursor_to(WindowsCoordinates(row=y - 1, col=x - 1)) elif control_type == ControlType.CARRIAGE_RETURN: term.write_text("\r") elif control_type == ControlType.HOME: term.move_cursor_to(WindowsCoordinates(0, 0)) elif control_type == ControlType.CURSOR_UP: term.move_cursor_up() elif control_type == ControlType.CURSOR_DOWN: term.move_cursor_down() elif control_type == ControlType.CURSOR_FORWARD: term.move_cursor_forward() elif control_type == ControlType.CURSOR_BACKWARD: term.move_cursor_backward() elif control_type == ControlType.CURSOR_MOVE_TO_COLUMN: _, column = cast(Tuple[ControlType, int], control_code) term.move_cursor_to_column(column - 1) elif control_type == ControlType.HIDE_CURSOR: term.hide_cursor() elif control_type == ControlType.SHOW_CURSOR: term.show_cursor() elif control_type == ControlType.ERASE_IN_LINE: _, mode = cast(Tuple[ControlType, int], control_code) if mode == 0: term.erase_end_of_line() elif mode == 1: term.erase_start_of_line() elif mode == 2: term.erase_line() elif control_type == ControlType.SET_WINDOW_TITLE: _, title = cast(Tuple[ControlType, str], control_code) term.set_title(title)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293from __future__ import annotations
import refrom typing import Iterable
from ._loop import loop_lastfrom .cells import cell_len, chop_cells
re_word = re.compile(r"\s*\S+\s*")
def words(text: str) -> Iterable[tuple[int, int, str]]: """Yields each word from the text as a tuple containing (start_index, end_index, word). A "word" in this context may include the actual word and any whitespace to the right. """ position = 0 word_match = re_word.match(text, position) while word_match is not None: start, end = word_match.span() word = word_match.group(0) yield start, end, word word_match = re_word.match(text, end)
def divide_line(text: str, width: int, fold: bool = True) -> list[int]: """Given a string of text, and a width (measured in cells), return a list of cell offsets which the string should be split at in order for it to fit within the given width.
Args: text: The text to examine. width: The available cell width. fold: If True, words longer than `width` will be folded onto a new line.
Returns: A list of indices to break the line at. """ break_positions: list[int] = [] # offsets to insert the breaks at append = break_positions.append cell_offset = 0 _cell_len = cell_len
for start, _end, word in words(text): word_length = _cell_len(word.rstrip()) remaining_space = width - cell_offset word_fits_remaining_space = remaining_space >= word_length
if word_fits_remaining_space: # Simplest case - the word fits within the remaining width for this line. cell_offset += _cell_len(word) else: # Not enough space remaining for this word on the current line. if word_length > width: # The word doesn't fit on any line, so we can't simply # place it on the next line... if fold: # Fold the word across multiple lines. folded_word = chop_cells(word, width=width) for last, line in loop_last(folded_word): if start: append(start) if last: cell_offset = _cell_len(line) else: start += len(line) else: # Folding isn't allowed, so crop the word. if start: append(start) cell_offset = _cell_len(word) elif cell_offset and start: # The word doesn't fit within the remaining space on the current # line, but it *can* fit on to the next (empty) line. append(start) cell_offset = _cell_len(word)
return break_positions
if __name__ == "__main__": # pragma: no cover from .console import Console
console = Console(width=10) console.print("12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345") print(chop_cells("abcdefghijklmnopqrstuvwxyz", 10))
console = Console(width=20) console.rule() console.print("TextualはPythonの高速アプリケーション開発フレームワークです")
console.rule() console.print("アプリケーションは1670万色を使用でき")123456789101112131415161718192021222324252627282930313233from abc import ABC
class RichRenderable(ABC): """An abstract base class for Rich renderables.
Note that there is no need to extend this class, the intended use is to check if an object supports the Rich renderable protocol. For example::
if isinstance(my_object, RichRenderable): console.print(my_object)
"""
@classmethod def __subclasshook__(cls, other: type) -> bool: """Check if this class supports the rich render protocol.""" return hasattr(other, "__rich_console__") or hasattr(other, "__rich__")
if __name__ == "__main__": # pragma: no cover from rich.text import Text
t = Text() print(isinstance(Text, RichRenderable)) print(isinstance(t, RichRenderable))
class Foo: pass
f = Foo() print(isinstance(f, RichRenderable)) print(isinstance("", RichRenderable))123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320from itertools import chainfrom typing import TYPE_CHECKING, Iterable, Optional, Literal
from .constrain import Constrainfrom .jupyter import JupyterMixinfrom .measure import Measurementfrom .segment import Segmentfrom .style import StyleType
if TYPE_CHECKING: from .console import Console, ConsoleOptions, RenderableType, RenderResult
AlignMethod = Literal["left", "center", "right"]VerticalAlignMethod = Literal["top", "middle", "bottom"]
class Align(JupyterMixin): """Align a renderable by adding spaces if necessary.
Args: renderable (RenderableType): A console renderable. align (AlignMethod): One of "left", "center", or "right"" style (StyleType, optional): An optional style to apply to the background. vertical (Optional[VerticalAlignMethod], optional): Optional vertical align, one of "top", "middle", or "bottom". Defaults to None. pad (bool, optional): Pad the right with spaces. Defaults to True. width (int, optional): Restrict contents to given width, or None to use default width. Defaults to None. height (int, optional): Set height of align renderable, or None to fit to contents. Defaults to None.
Raises: ValueError: if ``align`` is not one of the expected values.
Example: .. code-block:: python
from rich.console import Console from rich.align import Align from rich.panel import Panel
console = Console() # Create a panel 20 characters wide p = Panel("Hello, [b]World[/b]!", style="on green", width=20)
# Renders the panel centered in the terminal console.print(Align(p, align="center")) """
def __init__( self, renderable: "RenderableType", align: AlignMethod = "left", style: Optional[StyleType] = None, *, vertical: Optional[VerticalAlignMethod] = None, pad: bool = True, width: Optional[int] = None, height: Optional[int] = None, ) -> None: if align not in ("left", "center", "right"): raise ValueError( f'invalid value for align, expected "left", "center", or "right" (not {align!r})' ) if vertical is not None and vertical not in ("top", "middle", "bottom"): raise ValueError( f'invalid value for vertical, expected "top", "middle", or "bottom" (not {vertical!r})' ) self.renderable = renderable self.align = align self.style = style self.vertical = vertical self.pad = pad self.width = width self.height = height
def __repr__(self) -> str: return f"Align({self.renderable!r}, {self.align!r})"
@classmethod def left( cls, renderable: "RenderableType", style: Optional[StyleType] = None, *, vertical: Optional[VerticalAlignMethod] = None, pad: bool = True, width: Optional[int] = None, height: Optional[int] = None, ) -> "Align": """Align a renderable to the left.""" return cls( renderable, "left", style=style, vertical=vertical, pad=pad, width=width, height=height, )
@classmethod def center( cls, renderable: "RenderableType", style: Optional[StyleType] = None, *, vertical: Optional[VerticalAlignMethod] = None, pad: bool = True, width: Optional[int] = None, height: Optional[int] = None, ) -> "Align": """Align a renderable to the center.""" return cls( renderable, "center", style=style, vertical=vertical, pad=pad, width=width, height=height, )
@classmethod def right( cls, renderable: "RenderableType", style: Optional[StyleType] = None, *, vertical: Optional[VerticalAlignMethod] = None, pad: bool = True, width: Optional[int] = None, height: Optional[int] = None, ) -> "Align": """Align a renderable to the right.""" return cls( renderable, "right", style=style, vertical=vertical, pad=pad, width=width, height=height, )
def __rich_console__( self, console: "Console", options: "ConsoleOptions" ) -> "RenderResult": align = self.align width = console.measure(self.renderable, options=options).maximum rendered = console.render( Constrain( self.renderable, width if self.width is None else min(width, self.width) ), options.update(height=None), ) lines = list(Segment.split_lines(rendered)) width, height = Segment.get_shape(lines) lines = Segment.set_shape(lines, width, height) new_line = Segment.line() excess_space = options.max_width - width style = console.get_style(self.style) if self.style is not None else None
def generate_segments() -> Iterable[Segment]: if excess_space <= 0: # Exact fit for line in lines: yield from line yield new_line
elif align == "left": # Pad on the right pad = Segment(" " * excess_space, style) if self.pad else None for line in lines: yield from line if pad: yield pad yield new_line
elif align == "center": # Pad left and right left = excess_space // 2 pad = Segment(" " * left, style) pad_right = ( Segment(" " * (excess_space - left), style) if self.pad else None ) for line in lines: if left: yield pad yield from line if pad_right: yield pad_right yield new_line
elif align == "right": # Padding on left pad = Segment(" " * excess_space, style) for line in lines: yield pad yield from line yield new_line
blank_line = ( Segment(f"{' ' * (self.width or options.max_width)}\n", style) if self.pad else Segment("\n") )
def blank_lines(count: int) -> Iterable[Segment]: if count > 0: for _ in range(count): yield blank_line
vertical_height = self.height or options.height iter_segments: Iterable[Segment] if self.vertical and vertical_height is not None: if self.vertical == "top": bottom_space = vertical_height - height iter_segments = chain(generate_segments(), blank_lines(bottom_space)) elif self.vertical == "middle": top_space = (vertical_height - height) // 2 bottom_space = vertical_height - top_space - height iter_segments = chain( blank_lines(top_space), generate_segments(), blank_lines(bottom_space), ) else: # self.vertical == "bottom": top_space = vertical_height - height iter_segments = chain(blank_lines(top_space), generate_segments()) else: iter_segments = generate_segments() if self.style: style = console.get_style(self.style) iter_segments = Segment.apply_style(iter_segments, style) yield from iter_segments
def __rich_measure__( self, console: "Console", options: "ConsoleOptions" ) -> Measurement: measurement = Measurement.get(console, options, self.renderable) return measurement
class VerticalCenter(JupyterMixin): """Vertically aligns a renderable.
Warn: This class is deprecated and may be removed in a future version. Use Align class with `vertical="middle"`.
Args: renderable (RenderableType): A renderable object. style (StyleType, optional): An optional style to apply to the background. Defaults to None. """
def __init__( self, renderable: "RenderableType", style: Optional[StyleType] = None, ) -> None: self.renderable = renderable self.style = style
def __repr__(self) -> str: return f"VerticalCenter({self.renderable!r})"
def __rich_console__( self, console: "Console", options: "ConsoleOptions" ) -> "RenderResult": style = console.get_style(self.style) if self.style is not None else None lines = console.render_lines( self.renderable, options.update(height=None), pad=False ) width, _height = Segment.get_shape(lines) new_line = Segment.line() height = options.height or options.size.height top_space = (height - len(lines)) // 2 bottom_space = height - top_space - len(lines) blank_line = Segment(f"{' ' * width}", style)
def blank_lines(count: int) -> Iterable[Segment]: for _ in range(count): yield blank_line yield new_line
if top_space > 0: yield from blank_lines(top_space) for line in lines: yield from line yield new_line if bottom_space > 0: yield from blank_lines(bottom_space)
def __rich_measure__( self, console: "Console", options: "ConsoleOptions" ) -> Measurement: measurement = Measurement.get(console, options, self.renderable) return measurement
if __name__ == "__main__": # pragma: no cover from rich.console import Console, Group from rich.highlighter import ReprHighlighter from rich.panel import Panel
highlighter = ReprHighlighter() console = Console()
panel = Panel( Group( Align.left(highlighter("align='left'")), Align.center(highlighter("align='center'")), Align.right(highlighter("align='right'")), ), width=60, style="on dark_blue", title="Align", )
console.print( Align.center(panel, vertical="middle", style="on red", height=console.height) ).cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/METADATAAdded+479
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/RECORDAdded+105
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/WHEELAdded+4
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich-15.0.0.dist-info/licenses/LICENSEAdded+19
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/__init__.pyAdded+177
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/__main__.pyAdded+245
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_emoji_codes.pyAdded
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_emoji_replace.pyAdded+31
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_export_format.pyAdded+76
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_extension.pyAdded+10
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_fileno.pyAdded+24
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_inspect.pyAdded+272
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_log_render.pyAdded+94
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_loop.pyAdded+43
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_null_file.pyAdded+69
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_palettes.pyAdded+309
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_pick.pyAdded+17
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_ratio.pyAdded+153
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_spinners.pyAdded+482
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_stack.pyAdded+16
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_timer.pyAdded+19
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/__init__.pyAdded+93
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/_versions.pyAdded+23
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode10-0-0.pyAdded+611
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode11-0-0.pyAdded+625
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode12-0-0.pyAdded+637
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode12-1-0.pyAdded+636
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode13-0-0.pyAdded+648
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode14-0-0.pyAdded+661
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode15-0-0.pyAdded+671
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode15-1-0.pyAdded+670
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode16-0-0.pyAdded+683
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode17-0-0.pyAdded+691
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode4-1-0.pyAdded+425
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode5-0-0.pyAdded+430
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode5-1-0.pyAdded+433
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode5-2-0.pyAdded+461
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-0-0.pyAdded+469
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-1-0.pyAdded+480
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-2-0.pyAdded+480
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode6-3-0.pyAdded+481
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode7-0-0.pyAdded+507
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode8-0-0.pyAdded+515
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_unicode_data/unicode9-0-0.pyAdded+598
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_win32_console.pyAdded+661
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_windows.pyAdded+71
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_windows_renderer.pyAdded+56
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/_wrap.pyAdded+93
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/abc.pyAdded+33
.cache/uv/archive-v0/_QxAf0YBiX9_BJEuGlXFM/rich/align.pyAdded+320