printing table on the command line

James Mills prologic at shortcircuit.net.au
Thu Apr 29 04:31:47 EDT 2010


On Thu, Apr 29, 2010 at 6:03 PM, Daniel Dalton <d.dalton at iinet.net.au> wrote:
> Hello,

Hi,

> Any examples of how to do this would be great, as I'm blind and it's a
> bit difficult to check the spacing.

You're welcome to adapt some of my old code
written just for this very purpose. I even have a
tool called 'pysqlplus' that's much-like the mysql
command-line tool but will also work for sqlite
and oracle databases (if you have the python drivers
installed).

See:

http://bitbucket.org/prologic/pymills/src/tip/pymills/table.py

and

http://bitbucket.org/prologic/tools/src/tip/pysqlplus

cheers
James



More information about the Python-list mailing list