Cranky Frankie wrote:
I'm working on writing out postional output. When I use this statement:
print('%-40s%s' % (element_list[0], element_list[1]))
I get nice, lined up columns on the screen. When I write to a file like this:
new_line = ('%-40s%s%s' % (element_list[0], element_list[1],'\n')
On Mon, Nov 14, 2011 at 3:16 PM, Joel Goldstick
wrote:
> So, as was stated, best to use mono space if you are writing to a terminal.
> If you are writing web pages, of course you have lots of formatting options
>
> --
> Joel Goldstick
One option I've used in the past for issues such as this is e
On Mon, Nov 14, 2011 at 2:26 PM, Chris Fuller wrote:
>
> Fonts can be categorized as "fixed" or "proportional" widths. Proportional
> width fonts have different widths depending on the character.
>
> If you want to line up text, you must use fixed width fonts like courier,
> or
> use tabs, but t
Fonts can be categorized as "fixed" or "proportional" widths. Proportional
width fonts have different widths depending on the character.
If you want to line up text, you must use fixed width fonts like courier, or
use tabs, but that can be unreliable. You can get fancy and measure the width
On 14/11/11 18:58, Cranky Frankie wrote:
I'm working on writing out postional output. When I use this statement:
print('%-40s%s' % (element_list[0], element_list[1]))
...
a very funny thing happens. When I open the file in Notepad, the
columns are not lined up, however when I switch the fon
I'm working on writing out postional output. When I use this statement:
print('%-40s%s' % (element_list[0], element_list[1]))
I get nice, lined up columns on the screen. When I write to a file like this:
new_line = ('%-40s%s%s' % (element_list[0], element_list[1],'\n'))
file_out.write(new_lin