Be aware of the big wrapping dangers of Unicode. U+FDFD is a single very wide character: ﷽ in some fonts, and a reasonably large one in others. Ask your library to wrap, and if it has no knowledge of font widths (and you’re not using a monospace font), you’ll end up with lines that are guaranteed to blow everything up.
I would generally maintain healthy skepticism when someone attempts to wrap text without knowing how it is going to be rendered, although the rest of the functionality of the textwrap module in python are quite useful.






















