python-AsciiTable

oldwangtou 2018-07-16 原文

python-AsciiTable

1、AsciiTable

AsciiTable是最简单的表。它使用+|-字符来构建边框。

绘制使用普通的ASCII字符,如桌子+|-

2、安装

Pip Install

The easiest way to get terminaltables is to use pip. Simply run this command.

pip install terminaltables

Latest from GitHub

You can also elect to install the latest bleeding-edge version by using pip to install directly from the GitHub repository.

pip install git+https://github.com/Robpol86/terminaltables.git

Clone and Install

Lastly you can also just clone the repo and install from it. Usually you only need to do this if you plan on contributing to the project.

git clone https://github.com/Robpol86/terminaltables.git
cd terminaltables
python setup.py install

3、Example

>>> table_date = [
… [‘name’,’age’],
… [‘oldwang’,28],
… [‘laowang’,30],
… ]

>>> print(table.table)
+———+—–+
| name | age |
+———+—–+
| oldwang | 28 |
| laowang | 30 |
+———+—–+

 更多内容:https://robpol86.github.io/terminaltables/settings.html

posted on 2018-07-16 11:19 老王头0321 阅读() 评论() 编辑 收藏

 

 
版权声明:本文为oldwangtou原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/oldwangtou/p/9316757.html

python-AsciiTable的更多相关文章

随机推荐

  1. 墙上时钟时间 ,用户cpu时间 ,系统cpu时间

    一、 墙上时钟时间 ,用户cpu时间 ,系统cpu时间定义与联系 时钟时间(墙上时钟时间wall clock […]...

  2. Transformer

    Transformer简介 特点: 1、注意力机制   不需要循环和卷积,计算量相对较小,可为训练节省时间。 […]...

  3. .NET Core WebAPI post参数传递时后端的接收方式

    .NET Core WebAPI post参数传递时后端的接收方式 实体类 dynamic动态类型 JObje […]...

  4. VRChat之blender教程

    推荐先看:VRChat模型制作及上传总篇(包含总流程和所需插件):https://www.cnblogs.co […]...

  5. SQLMAP

    SQLMAP介绍当然也可以过一些wafsqlmap安装基本的参数–is-dba 基本的还是 sqlmap.py […]...

  6. 经典网页设计:25个优秀的个人网站设计欣赏

    个人网站是让人们知道你,了解你生活中成就的最佳方式。有些人选择最搞笑的言论表达自己的想法,有的人则充分展现自己 […]...

  7. 本地windows主机无法访问虚拟机里主机解决办法

    一:设置虚拟机里IP,使其与本地计算机IP在同一网段 本地计算机网络IP设置如下:   虚拟机里ip为192. […]...

  8. 如何用GO实现一个tail -f功能以及相应的思维发散

    此文已由作者杨望暑授权网易云社区发布。 欢迎访问网易云社区,了解更多网易技术产品运营经验。 背景 在服务端查看 […]...

展开目录

目录导航