Re: P3 weird sys.stdout.write()

2009-08-24 Thread Jerzy Jalocha N
On Mon, Aug 24, 2009 at 10:52 AM, Dave Angel wrote: > The write() function changed in 3.0, but not in the way you're describing. >  It now (usually) has a return value, the count of the number of characters > written. [...] > But because you're running from the interpreter, you're seeing the return

Re: P3 weird sys.stdout.write()

2009-08-24 Thread Dave Angel
Jerzy Jalocha N wrote: I've stumbled upon the following in Python 3: Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. import sys sys.stdout.write("") 0 sys.stdout.write("something")

Re: P3 weird sys.stdout.write()

2009-08-24 Thread Jerzy Jalocha N
>>> import sys >>> n = sys.stdout.write('something') something>>> n 9 >>> Yes, that works as expected, now, similar to 2.6. Thank you both, Diez and André! -Jerzy -- http://mail.python.org/mailman/listinfo/python-list

Re: P3 weird sys.stdout.write()

2009-08-24 Thread André
On Aug 24, 10:13 am, Jerzy Jalocha N wrote: > I've stumbled upon the following in Python 3: > > Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22) > [GCC 4.3.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > > >>> import sys > >>> sys.stdout.write("") > 0 > >>>

Re: P3 weird sys.stdout.write()

2009-08-24 Thread Diez B. Roggisch
Jerzy Jalocha N wrote: > I've stumbled upon the following in Python 3: > > Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22) > [GCC 4.3.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. import sys sys.stdout.write("") > 0 sys.stdout.write("someth