jazzband / prettytable

Display tabular data in a visually appealing ASCII table format
https://pypi.org/project/PrettyTable/
Other
1.35k stars 154 forks source link

Removing all padding still results in padding existing. #220

Open ryantheleach opened 1 year ago

ryantheleach commented 1 year ago

What did you do?

Set all padding to zero, and removed all VRules

What did you expect to happen?

============================================================
Name                              Played     Won       Chips
============================================================
xxxxxxxxxxxxxxxxxxxx                  xxasdfasdfzxcvzxcvzxcv
1                   xxxxxxxxxxxxxxxxxxxx      xx           4
============================================================

What actually happened?

=================================================================
 Name                               Played      Won        Chips 
=================================================================
 xxxxxxxxxxxxxxxxxxxx                   xx asdfasdf zxcvzxcvzxcv 
 1                    xxxxxxxxxxxxxxxxxxxx       xx            4 
=================================================================

What I was trying to actually achieve, but struggled to find the options for:

===============================================================
Name                               Played      Won        Chips
===============================================================
xxxxxxxxxxxxxxxxxxxx                   xx asdfasdf zxcvzxcvzxcv
1                    xxxxxxxxxxxxxxxxxxxx       xx            4
===============================================================

Basically, it appear impossible to create tables on PrettyTable that have zero padding, namely because space padding characters are added automatically. see: https://github.com/jazzband/prettytable/blob/master/src/prettytable/prettytable.py#L1869

even if it would be intuitive for zero padding to mean minimum padding for internal padding, it doesn't make sense for it to exist for the outside edges.

As it is, it's acting like what I would have expected if the vrule character was set to " " and the cross characters set to "="