This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Printtable是一个可以在terminal上输出数据表样式的python公共库。

下载方式

 pip install printtable

引用printtable

 from printtable import PrintTable

首先我们需要构建表的表头,然后创建表

attributes=[[‘name’,’old’]]

table = PrintTable(attributes)

然后我们有两种方式向表内加入数据

1.append_data:可以通过明确特征来加入一行数据中的一部分数据或者多行数据。

 table.append_data(name=”Jack”,old = “20”)

 table.append_data(name =[“Jack”,”Mary”], old =[“20”,”19”])

2.append_data_list: 可以直接使用list格式的变量向表中加入一行数据。不过要注意数据的顺序要符合创建表时的表头相同。

 table.append_data_list([“Jack”,”20”])

支持加入中文数据,但表头目前只能支持英文。

 table.append_data(name = “小明”,old = “20”)

 table.append_data(name =[“小华”,”大傻”], old =[“20”,”19”])

 table.append_data_list([“二傻子”,”20”])

最后我们可以在terminal直接输出ASCII表。通过line_num参数来控制在每行数据前是否加上行号,1为加入,默认为不加入行号。

table.printTable(1)

table.printTable()

Release History

Release History

1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
printtable-1.2-py2.7.egg (6.5 kB) Copy SHA256 Checksum SHA256 2.7 Egg Nov 2, 2015
printtable-1.2.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Nov 2, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting