On Mon, 26 Oct 2009, Martin Geisler wrote: > Henrik Stuart <h...@hstuart.dk> writes: > >> # HG changeset patch >> # User Henrik Stuart <henrik.stu...@edlund.dk> >> # Date 1255694720 -7200 >> # Branch stable >> # Node ID 1a4b7396fbaa0e3e98eb473b7a78736fc1eb7ab0 >> # Parent 7309a8ee1daf9b75062b9840fa1b95fd69ad9811 >> commit: fix off-by-one in reflow > > Cool, I didn't know that hgtk could do that. Is there a reason you don't > use the standard textwrap module?
If you mean just using textwrap.fill for all of it then: textwrap.fill('this is an interesting\nfeature.\n\nSome more information.\n', 10, break_long_words=False) yields: 'this is an\ninteresting\nfeature.\nthis is\nsome more\ninteresting\nwork.' which is not what we want. Of course you could argue that one could use textwrap per paragraph, but I haven't really been entirely happy with its functionality and defaults in general, so I decided to implement the functionality myself. -- Kind regards, Henrik Stuart ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop