In <[EMAIL PROTECTED]>, Ant wrote:
> ----------------------------------------------------------------------------------
> #!/usr/bin/python
> print "Testing",
>
> Running the bash script, I get the following output:
>
> OKt var: Testing
> Test var2: Test2 OK
>
> Does anyone have any idea why the script would mess up the first echo?
> Are there some kind of control characters being appended to the python
> output in Windows? Looks like a CR character, but why?
It's a feature. The `sys.stdout` object remembers if the last ``print``
ended in a comma (see the `sys.stdout.softspace` attribute) and when the
interpreter executes its shutdown code and that `softspace` attribute is
set, an extra '\n' is printed.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list