Closed GoogleCodeExporter closed 9 years ago
Hello Daniel,
I'm a new dev on this project, and I'm looking into this now. It appears that
setting the style to PLAIN_COLUMNS:
x.set_style(pt.PLAIN_COLUMNS)
sets an internal right_padding_width variable to 8 spaces. That variable is
what is giving you the extra space in your output. The preset styles are
supposed to be quick default options, and the right padding width needs to be
*something* - so 8 characters was chosen "Just as a style thing, man," as my
old programming professor, Dr. Khabou would say.
If you want to change the padding width to, say, 1 instead of 8 either call
x.right_padding_width = 1
or instead of using set_style, make manual calls to all of the methods called
therein:
x.header = True
x.border = False
x.padding_width = 1
x.left_padding_width = 0
x.right_padding_width = 1 # <<< this will cure what ails ya
Original comment by john.fil...@gmail.com
on 6 Jul 2014 at 9:04
Hi John,
thanks for looking into this, I'll check and see if this works for me :) I've
implemented a quality control tool using Python and prettytable for a simple
report document, and it works nice for now.
Thanks a lot for that piece of work and best regards,
Daniel
Original comment by danielst...@googlemail.com
on 7 Jul 2014 at 3:25
Original issue reported on code.google.com by
danielst...@googlemail.com
on 15 May 2014 at 2:35Attachments: