title: Python Textwrap - forcing 'hard' breaks
body: <p>I am trying to use textwrap to format an import file that is quite particular in how it is formatted. Basically, it is as follows (line length shortened for simplicity):</p>
  
  <pre><code>abcdef &lt;- Ok line
  abcdef 
   ghijk &lt;- Note leading space to indicate wrapped line
   lm
  </code></pre>
  
  <p>Now, I have got code to work as follows:</p>
  
  <pre><code>wrapper = TextWrapper(width=80, subsequent_indent=' ', break_long_words=True, break_on_hyphens=False)
  for l in lines:
    wrapline=wrapper.wrap(l)
  </code></pre>
  
  <p>This works nearly perfectly, however, the text wrapping code doesn't do a hard break at the 80 character mark, it tries to be smart and break on a space (at approx 20 chars in). </p>
  
  <p>I have got round this by replacing all spaces in the string list with a unique character (#), wrapping them and then removing the character, but surely there must be a cleaner way?</p>
  
  <p>N.B Any possible answers need to work on Python 2.4 - sorry!</p>