Hi,
I'm creating a python script that can take a string and print it to the
screen as a simple multi-columned block of mono-spaced, unhyphenated
text based on a specified character width and line hight for a column.
For example, if i fed the script an an essay, it would format the text
like a news
Leon wrote:
> Hi,
>
> I'm creating a python script that can take a string and print it to the
> screen as a simple multi-columned block of mono-spaced, unhyphenated
> text based on a specified character width and line hight for a column.
> For example, if i fed the script an an essay, it would for
"Leon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I'm creating a python script that can take a string and print it to the
> screen as a simple multi-columned block of mono-spaced, unhyphenated
> text based on a specified character width and line hight for a column.
> For
On 26 Dec 2006 04:14:27 -0800, Leon <[EMAIL PROTECTED]> wrote:
> I'm creating a python script that can take a string and print it to the
> screen as a simple multi-columned block of mono-spaced, unhyphenated
> text based on a specified character width and line hight for a column.
Hi, Leon,
For pu
Thanks, Paul. I didn't know about textwrap, that's neat.
Leon,
so in my example change
> data1= [testdata[x:x+colwidth] for x in range(0,len(testdata),colwidth)]
to
> data1 = textwrap.wrap(testdata,colwidth)
> data1 = [x.ljust(colwidth) for x in data1]
oh and I made a mistake that double spaces i
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> gettysburgAddress = """Four score and seven years ago...
By the way, this variable contains only 3 (very long) lines of text, one for
each paragraph. (Not immediately obvious after Usenet wraps the text.)
-- Paul
"Paul McGuire" <[EMAIL PROTECTED]> wrote:
> By the way, this variable contains only 3 (very long) lines of text,
> one for each paragraph. (Not immediately obvious after Usenet wraps
> the text.)
Usenet doesn't wrap text, all it has is a convention which suggests that
people posting to usenet sh
"Dave Borne" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Thanks, Paul. I didn't know about textwrap, that's neat.
>
> Leon,
> so in my example change
>> data1= [testdata[x:x+colwidth] for x in
>> range(0,len(testdata),colwidth)]
> to
>> data1 = textwrap.wrap(testdata,colwidth)
>> dat