python - Python 中是否有类似 Powershell 的创建文本表格的工具?

标签 python console

每当 PowerShell 显示其对象时,它都会在等宽控制台中以漂亮的方式对它们进行格式化,例如:

> ps

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
    101       5     1284       3656    32     0.03   3876 alg
    257       7     4856      10228    69     0.67    872 asghost
    101       4     3080       4696    38     0.36   1744 atiptaxx
    179       7     5568       7008    54     0.22    716 BTSTAC~1
...

Python 中是否有类似的库,或者我是否可以创建一个?

最佳答案

我认为 python texttable模块完全符合您的要求。

For further information.

关于python - Python 中是否有类似 Powershell 的创建文本表格的工具?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4295434/

相关文章:

python - 阿拉伯语 - Python 2.7 中的 UnicodeDecodeError

python - 使用 Python 绘制蝴蝶曲线

Python CSV 解析,转义引号字符

linux - 如何在不退出 ssh session 的情况下退出 IPMI SOL session ?

javascript - 消除控制台中的 404 url​​ 错误?

c# - 写方法时如何防止某些形式的输入?

Python - 如何将输出文本向左/向上移动?

python - 抓取图片url src时,获取数据:image/jpeg;base64

c++ - 如何一次打印带有空格的整个 wchar_t? (c++)

java - 在 Eclipse 控制台中为日志着色