Controlling output using print with format string

2005-10-30 Thread Paul Watson
It is clear that just using 'print' with variable names is relatively uncontrollable. However, I thought that using a format string would reign the problem in and give the desired output. Must I resort to sys.stdout.write() to control output? $ python Python 2.4.1 (#1, Jul 19 2005, 14:16:43)

Re: Controlling output using print with format string

2005-10-30 Thread Alex Martelli
Paul Watson [EMAIL PROTECTED] wrote: It is clear that just using 'print' with variable names is relatively uncontrollable. However, I thought that using a format string would reign the problem in and give the desired output. Must I resort to sys.stdout.write() to control output? In

Re: Controlling output using print with format string

2005-10-30 Thread Mike Meyer
Paul Watson [EMAIL PROTECTED] writes: It is clear that just using 'print' with variable names is relatively uncontrollable. However, I thought that using a format string would reign the problem in and give the desired output. Must I resort to sys.stdout.write() to control output? No. You

Re: Controlling output using print with format string

2005-10-30 Thread Bengt Richter
On Sun, 30 Oct 2005 18:44:06 -0600, Paul Watson [EMAIL PROTECTED] wrote: It is clear that just using 'print' with variable names is relatively uncontrollable. However, I thought that using a format string would reign the problem in and give the desired output. Must I resort to