开发者

how to print the mysql shell output table

开发者 https://www.devze.com 2023-03-29 13:18 出处:网络
in mysql shell print a table like this [code][1] mysql> show databases; +--------------------+ Database|

in mysql shell print a table like this

[code][1]

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| PROXY              |
| bbs_bj             |
| bbs_bj_copy        |
| mysql              |
| octopus            |
| octopus_cp         |
| spider             |
+--------------------+

i want to print this table to the printer keep right formate

is there any python package lib to hand开发者_如何学JAVA this

or have some way to change the table to html and pdf ?


Just get the result of "show databases" query, and format the result what ever you want.To output as pdf, you may use some lib like pyPdf.

0

精彩评论

暂无评论...
验证码 换一张
取 消