Skip to content

liuhedong135/ttytables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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


About

Print table on Linux or Windows terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages