Comments (2)
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.
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)
- Not printing out table in ordered rows HOT 3
- Footer HOT 2
- preetytable can't display chinese character normally.
- the data on "how to display chinese character"
- how to display "ambiguous" width in chinese character?
- Field alignment error when using "blessings" module HOT 1
- Adding colors to column values messes up the spacing HOT 2
- Setting float_format in **kwargs does not actually affect output - confusing behavior HOT 1
- Permissions are incorrect HOT 1
- Add date formatting for datetime etc instances HOT 3
- In get_string, end is eval before sortby
- HTML output is lacking borders, alignment
- Cannot print unicode characters, for example: degree symbol °
- Pandas DataFrame Table Factory HOT 3
- Upload new version to pypi
- xterm reset escape sequence not filtered
- Support large tables in output HOT 1
- Prettytable 0.7.2 does not handle rowspan correctly
- Creating a PrettyTable inside a for.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettytable.