Re: [Tutor] console output that is same in Python 2 and 3

2010-09-28 Thread Tim Golden
On 27/09/2010 17:11, Thierry Tung wrote: Hello tutor at python.org. How can I write strings to the console in a way that will give the same result in Python 3 and Python 2? I tried sys.stdout.write('hello') on Microsoft vista. with python 3.1.2 sys.stdout.write('hello') hello5 with py

[Tutor] console output that is same in Python 2 and 3

2010-09-28 Thread Thierry Tung
Hello tutor at python.org. How can I write strings to the console in a way that will give the same result in Python 3 and Python 2? I tried sys.stdout.write('hello') on Microsoft vista. with python 3.1.2 >>>sys.stdout.write('hello') hello5 >>> with python 2.7 >>>sys.stdout.write('hello') hel