Python字符界面函数库
2016-06-04 21:36
711 查看
curses
ncurses
prettytable
ncurses
prettytable
from prettytable import PrettyTable row = PrettyTable() row.field_names = ["Name", "Age", "Country", "City"] # 增加表头 row.add_row(['shaw', '23', 'China', 'Shanghai']) # 增加行数据 row.add_row(['charle', '29', 'China', 'Xuzhou']) row.add_row(['jack', '32', 'United States', 'Washington']) print(row) # 结果: # +--------+-----+---------------+------------+ # | Name | Age | Country | City | # +--------+-----+---------------+------------+ # | shaw | 23 | China | Shanghai | # | charle | 29 | China | Xuzhou | # | jack | 32 | United States | Washington | # +--------+-----+---------------+------------+
相关文章推荐
- Opencv3.0-python的那些事儿:(五)、Opencv的图像模糊
- ImportError: No module named _curses / fcntl
- Python 华理 教学周
- nested function in python
- Python使用函数默认值实现函数静态变量的方法
- Ipython notebook安装
- Python Tricks(十六)—— list转换为str
- Python--基础学习--流程控制
- python 数据清理诺干错误
- Python内置函数chr() unichr() ord()
- Python机器学习开发环境搭建和GraphLab Create安装
- python爬虫的使用
- python str bytes转换
- Python进阶之函数式编程
- Python--详解Python中re.sub
- Opencv3.0-python的那些事儿:(四)、Opencv的图像阈值处理
- python学习第一天
- Python list 交集,并集,差集
- python学习 函数
- Python断行