GithubHelp home page GithubHelp logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
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 [email protected] on 6 Jul 2014 at 9:04

  • Changed state: Invalid

from prettytable.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
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 [email protected] on 7 Jul 2014 at 3:25

from prettytable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.