File size: 13,951 Bytes
5b76e0f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.. _appendix_box:

Box
===

Rich has a number of constants that set the box characters used to draw tables and panels. To select a box style import one of the constants below from ``rich.box``. For example::

    from rich import box
    table = Table(box=box.SQUARE)


.. note::
    Some of the box drawing characters will not display correctly on Windows legacy terminal (cmd.exe) with *raster* fonts, and are disabled by default. If you want the full range of box options on Windows legacy terminal, use a *truetype* font and set the ``safe_box`` parameter on the Table class to ``False``.


The following table is generated with this command::

    python -m rich.box

.. raw:: html

    <pre style="font-size:90%;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="color: #008000">โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ</span>
    <span style="color: #008000">โ”‚</span>                                <span style="color: #008000; font-weight: bold">Box Constants</span>                                 <span style="color: #008000">โ”‚
    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ</span>

    <span style="color: #800080">        box.ASCII         </span>  <span style="color: #800080">        box.SQUARE        </span>  <span style="color: #800080">      box.MINIMAL       </span>
    +------------------------+  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                          
    |<span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>|<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>|  โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>โ”‚   <span style="color: #7f7f7f; font-weight: bold"> Header 1  </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> 
    |------------+-----------|  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 
    |<span style="color: #7f7f7f"> Cell       </span>|<span style="color: #7f7f7f"> Cell      </span>|  โ”‚<span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”‚   <span style="color: #7f7f7f"> Cell      </span>โ”‚<span style="color: #7f7f7f"> Cell     </span> 
    |<span style="color: #7f7f7f"> Cell       </span>|<span style="color: #7f7f7f"> Cell      </span>|  โ”‚<span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”‚   <span style="color: #7f7f7f"> Cell      </span>โ”‚<span style="color: #7f7f7f"> Cell     </span> 
    |------------+-----------|  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 
    |<span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>|<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>|  โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>โ”‚   <span style="color: #7f7f7f; font-weight: bold"> Footer 1  </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> 
    +------------------------+  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                          
                                                                                    
                                                                                    
    <span style="color: #800080">  box.MINIMAL_HEAVY_HEAD  </span>  <span style="color: #800080"> box.MINIMAL_DOUBLE_HEAD  </span>  <span style="color: #800080">       box.SIMPLE       </span>
                                                                                    
     <span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>    <span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>    <span style="color: #7f7f7f; font-weight: bold"> Header 1  </span> <span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> 
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฟโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”    โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
     <span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>    <span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>    <span style="color: #7f7f7f"> Cell      </span> <span style="color: #7f7f7f"> Cell     </span> 
     <span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>    <span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>    <span style="color: #7f7f7f"> Cell      </span> <span style="color: #7f7f7f"> Cell     </span> 
     โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€    โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
     <span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>    <span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>    <span style="color: #7f7f7f; font-weight: bold"> Footer 1  </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> 
                                                                                    
                                                                                    
                                                                                    
    <span style="color: #800080">     box.SIMPLE_HEAVY     </span>  <span style="color: #800080">     box.HORIZONTALS      </span>  <span style="color: #800080">      box.ROUNDED       </span>
                                โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
     <span style="color: #7f7f7f; font-weight: bold"> Header 1   </span> <span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>    <span style="color: #7f7f7f; font-weight: bold"> Header 1   </span> <span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>   โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 1  </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>โ”‚
    โ•บโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•ธ  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
     <span style="color: #7f7f7f"> Cell       </span> <span style="color: #7f7f7f"> Cell      </span>    <span style="color: #7f7f7f"> Cell       </span> <span style="color: #7f7f7f"> Cell      </span>   โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”‚<span style="color: #7f7f7f"> Cell     </span>โ”‚
     <span style="color: #7f7f7f"> Cell       </span> <span style="color: #7f7f7f"> Cell      </span>    <span style="color: #7f7f7f"> Cell       </span> <span style="color: #7f7f7f"> Cell      </span>   โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”‚<span style="color: #7f7f7f"> Cell     </span>โ”‚
    โ•บโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•ธ  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
     <span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>    <span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>   โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 1  </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>โ”‚
                                โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
                                                                                    
                                                                                    
    <span style="color: #800080">        box.HEAVY         </span>  <span style="color: #800080">      box.HEAVY_EDGE      </span>  <span style="color: #800080">     box.HEAVY_HEAD     </span>
    โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“  โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฏโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“  โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
    โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>โ”ƒ  โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>โ”ƒ  โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Header 1  </span>โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>โ”ƒ
    โ”ฃโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‹โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ซ  โ” โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”จ  โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
    โ”ƒ<span style="color: #7f7f7f"> Cell       </span>โ”ƒ<span style="color: #7f7f7f"> Cell      </span>โ”ƒ  โ”ƒ<span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”ƒ  โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”‚<span style="color: #7f7f7f"> Cell     </span>โ”‚
    โ”ƒ<span style="color: #7f7f7f"> Cell       </span>โ”ƒ<span style="color: #7f7f7f"> Cell      </span>โ”ƒ  โ”ƒ<span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”ƒ  โ”‚<span style="color: #7f7f7f"> Cell      </span>โ”‚<span style="color: #7f7f7f"> Cell     </span>โ”‚
    โ”ฃโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‹โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ซ  โ” โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”จ  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
    โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>โ”ƒ  โ”ƒ<span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>โ”ƒ  โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 1  </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>โ”‚
    โ”—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ปโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”›  โ”—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ทโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”›  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                                                    
                                                                                    
    <span style="color: #800080">        box.DOUBLE        </span>  <span style="color: #800080">     box.DOUBLE_EDGE      </span>                          
    โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—  โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—                          
    โ•‘<span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>โ•‘<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>โ•‘  โ•‘<span style="color: #7f7f7f; font-weight: bold"> Header 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Header 2  </span>โ•‘                          
    โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ  โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข                          
    โ•‘<span style="color: #7f7f7f"> Cell       </span>โ•‘<span style="color: #7f7f7f"> Cell      </span>โ•‘  โ•‘<span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>โ•‘                          
    โ•‘<span style="color: #7f7f7f"> Cell       </span>โ•‘<span style="color: #7f7f7f"> Cell      </span>โ•‘  โ•‘<span style="color: #7f7f7f"> Cell       </span>โ”‚<span style="color: #7f7f7f"> Cell      </span>โ•‘                          
    โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ  โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข                          
    โ•‘<span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>โ•‘<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>โ•‘  โ•‘<span style="color: #7f7f7f; font-weight: bold"> Footer 1   </span>โ”‚<span style="color: #7f7f7f; font-weight: bold"> Footer 2  </span>โ•‘                          
    โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•  โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•                          
    </pre>