[Tutor] Splitting long lines correctly

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Tue, 30 Jul 2002 10:23:40 -0700 (PDT)


On Tue, 30 Jul 2002, Francois Granger wrote:

> on 30/07/02 5:45, Prahlad Vaidyanathan at slime@vsnl.net wrote:
>
> >   Now, the main problem I am facing is splitting long (> 80 chars)
> > lines into smaller lines, while still preserving the readability.
> >
> > ie. I do not want lines with a comma at the first column - instead I
> > would like to bring down the previous word onto the next line.
>
> I don't know how sophisticated you want it to be. I have been studying hte
> full rules for splitting words in french long time ago ;-)

By the way, if you want to do english hyphenation, here's a module that
may help you:

    http://hkn.eecs.berkeley.edu/~dyoo/python/pyHnj/index.html

The wrapper is, admittedly, a bit old, and I haven't compiled new versions
for Python 2.2.1 yet.