[Tim Williams]
>>For quick and simple removal of the extra space, append a '\b'
>>backspace character to your output "string"
[Jorgen Grahn]
> For things that are only ever to be viewed on the terminal, yes.
> But this does, of course, print an actual backspace character.
> If you feed this outpu
On Tue, 21 Jun 2005 00:08:03 +0100, Tim Williams (gmail) <[EMAIL PROTECTED]>
wrote:
...
> For quick and simple removal of the extra space, append a '\b'
> backspace character to your output "string"
For things that are only ever to be viewed on the terminal, yes.
But this does, of course, print
On 6/20/05, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> Paul Watson wrote:
>
> > While printf() does tightly control formatting in C, it does not in
> > Python.
>
> There is no printf() in Python. You should not think of print as being a
> Python version of printf.
For quick and simple removal
Paul Watson wrote:
> While printf() does tightly control formatting in C, it does not in
> Python.
There is no printf() in Python. You should not think of print as being a
Python version of printf.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for all replies.
Ok. I agree. While printf() does tightly control formatting in C, it does
not in Python. Using write() can be used to output with no changes to the
data.
"Tim Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Paul
>
> Based on your description
Hi Paul
Based on your description of what you want to do, print is probably not
the correct method of controlling output format. You should use write()
method of the file handle to get unadulterated output.
print is working as documented . From the Python 2.3 documentation,
Section 6.6 The P
Don't use print, write directly to sys.stdout.
Print is not intended for precise output formatting;
it's intended for quick outputs that are useable
most of the time.
John Roth
"Paul Watson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> #!/usr/bin/env python
>
> # Using a prin
#!/usr/bin/env python
# Using a print statement to stdout results in an
# unwanted space character being generated at the
# end of each print output. Same results on
# DOS/Windows and AIX.
#
# I need precise control over the bytes that are
# produced. Why is print doing this?
#
impor