ttytables

Print table on Linux or Windows terminal.


License
MIT
Install
pip install ttytables==0.0.1

Documentation

ttytable

Print table on Linux or Windows terminal


1. Install

pip install ttytable

Warning: Only the following is supported

  • Xshell: Default theme
  • MobaXterm: All
  • Vmware: All

Other tools have not been tested yet




2. Use

from ttytable.table import Use
c = Use(['Name', 'Age', 'Country'])
c.add_row(['Oliven', '20', 'China'])
c.add_row(['Bob', '29', 'American'])
c.echo()

use




3. Themes

  • c.style()
    style
  • c.style1()
    style1
  • c.style2()
    style2
  • c.style3()
    style3
  • c.style4()
    style4
  • c.style5()
    style5
  • c.style6()
    style6
  • c.style7()
    style7
  • c.style8()
    style8

3.1 Custom

You can customize it.

c.top_left = '1'     # โ†–
c.top_up = '2'       # โ†‘
c.top_right = '3'    # โ†—
c.left = '4'         # โ†
c.center = '5'       # ยท
c.right = '6'        # โ†’
c.bottom_left = '7'  # โ†™
c.bottom_down = '8'  # โ†“
c.bottom_right = '9' # โ†˜
c.vertical = 'o'     # |
c.across = 'x'       # -
c.echo()

It looks like this.
custom