whitespace in a word doc

Bruce epost2 at gmail.com
Thu Jul 15 03:45:10 EDT 2010


I'm trying to create a word doc using win32com. I don't get the same
whitespace as when printing the same stuff in the dos window. At the
terminal I manage to line up the second column like

apples          5
pears            7

I do this by adding whitespace characters to the strings in the first
column so that their length is equal to that of the longest string in
the first column.

I print the excact same string to word. but in the word doc somehting
happens that messes things up like this :

apples                        5
pears               7

Needless to say, this is extremely frustrating. But why does it
happen, and how can I align the column in word?



More information about the Python-list mailing list