question about the textwrap module
TP
Tribulations at Paralleles.invalid
Mon Oct 27 18:50:08 EDT 2008
Hi everybody,
Recently, I have tried to improve the look of the printed text in command
line. For this, I was compelled to remove redundant spaces in strings,
because in my scripts, often the strings are spreading on several lines.
For example, "aaa bbb" had to be transformed in "aaa bbb".
I have coded some simple functions to do that.
Today, by examining Python documentation, I have found an interesting
module:
http://www.python.org/doc/2.5.2/lib/module-textwrap.html
But, I haven't found any way to do my redundant space deletion with this
module? Am I right?
Thanks
Julien
--
python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.9&1+,\'Z
(55l4('])"
"When a distinguished but elderly scientist states that something is
possible, he is almost certainly right. When he states that something is
impossible, he is very probably wrong." (first law of AC Clarke)
More information about the Python-list
mailing list