Comments (10)
I've already got versions 3.9 through 3.11 installed, so one more won't be a problem. Thanks again for all the info!
from prettytable.
@ajgringo619 I can take care of this one if you would like.
from prettytable.
@ajgringo619 I can take care of this one if you would like.
Thanks a bunch. I'll be happy to test whatever you come up with.
from prettytable.
No, but it could be done by setting break_on_hyphens=False
here:
prettytable/src/prettytable/prettytable.py
Line 1957 in 1c0aeee
>>> import textwrap
>>> line = "bluedevil breeze breeze-gtk eos-bash-shared glib2 kactivitymanagerd kde-cli-tools"
>>> textwrap.fill(line, 40)
'bluedevil breeze breeze-gtk eos-bash-\nshared glib2 kactivitymanagerd kde-cli-\ntools'
>>> textwrap.fill(line, 40, break_on_hyphens=False)
'bluedevil breeze breeze-gtk\neos-bash-shared glib2 kactivitymanagerd\nkde-cli-tools'
>>>
Docs: https://docs.python.org/3/library/textwrap.html
Would you like to put a PR together to make it configurable?
Maybe the thing to do would have a dictionary that can be used to set all the other textwrap.fill
parameters?
from prettytable.
I've got the time, just not sure where to begin. Can you point me in the right direction? Never contributed directly to a Github project before.
from prettytable.
Sure!
The high level is:
You start off by forking this repo, there's a Fork button on the main page: https://github.com/jazzband/prettytable
Then clone it to your computer, for example: git clone https://github.com/ajgringo619/PrettyTable
Docs: https://docs.github.com/en/get-started/quickstart/fork-a-repo
The comes the coding, add what's needed, with tests. You can test locally via tox, pip install -U tox
, then tox -e py311
to test with Python 3.11 for example.
Also it's a good idea to enable GitHub Actions on your fork - https://github.com/ajgringo619/PrettyTable/actions - then it'll run the tests when you push.
When you're ready, you create a "pull request" to submit it back here. Then we can review it, update it, then merge.
Feel free to ask more details about any of these steps!
from prettytable.
Thanks for the detailed info, although I'm sure I'mm be asking a lot more questions. First one: what's the oldest version of Python I should be testing on?
from prettytable.
We follow the same as the upstream supported CPython versions, so Python 3.8.
You don't necessarily need to install all the versions though, because the CI will test 3.8-3.12 on Ubuntu, Windows and macOS.
from prettytable.
Is this fix going to fix the fact that column headers should also wrap? I have column headers that are dynamic, and I need them to wrap - otherwise the table looks terrible. SHould I open a new issue for that?
from prettytable.
Can't believe it's been 7 months since I had "time" to work on this; I deleted the fork as it was just sitting there collecting dust. If I can truly commit to this in the future, I will post again with actual progress.
from prettytable.
Related Issues (20)
- Support for rich colored cell data HOT 2
- Support displaying selected fields for CSV format
- Pretty printing inside cloudwatch logs HOT 1
- PrettyTable.add_rows method support divider Argument
- Calculate column width HOT 4
- Full-width characters cannot be wrapped correctly. HOT 2
- can you add an option for the divider, so insted of add the divider below it add its above?
- Negative Integer and Float in Red and positive in Green
- argument max_width doesn't work
- 3.10.0: pytest fails because incorrect module name HOT 2
- max_table_width does not work as expected HOT 7
- Colortable with title leads to broken layout HOT 6
- Add color to field names HOT 4
- Print table failed when I created a copy.py in the same directory with my other python files. HOT 1
- Markdown tables with narrow columns don't render
- Mediawiki Output
- Cannot release from Jazzband to PyPI HOT 5
- `float_format` not working HOT 1
- `float_format` not working HOT 1
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.