On 16.06.2020 1:40, Joseph Jenne via Python-Dev wrote:
On 2020-06-15 15:26, Ivan Pozdeev via Python-Dev wrote:
On 12.06.2020 11:01, Rob Cliffe via Python-Dev wrote:
If I run the following program (using Python 3.8.3 on a Windows 10 laptop):
import sys, time
for i in range(1,11):
sys.stdo
> On 16 Jun 2020, at 08:51, Greg Ewing wrote:
>
> On 16/06/20 12:20 pm, Steven D'Aprano wrote:
>> The whole point of the REPL is to evaluate an
>> expression and have the result printed. (That's the P in REPL :-)
>
> Still, it's a bit surprising that it prints results of
> expressions within a
On 16/06/20 12:20 pm, Steven D'Aprano wrote:
The whole point of the REPL is to evaluate an
expression and have the result printed. (That's the P in REPL :-)
Still, it's a bit surprising that it prints results of
expressions within a compound statement, not just at the
top level.
--
Greg
__
On Mon, Jun 15, 2020 at 8:31 PM Steven D'Aprano wrote:
> On Fri, Jun 12, 2020 at 09:01:33AM +0100, Rob Cliffe via Python-Dev wrote:
> > It appears that the requested characters are output, *followed by* the
> > number of characters output
> > (which is the value returned by sys.stdout.write) and
On Fri, Jun 12, 2020 at 09:01:33AM +0100, Rob Cliffe via Python-Dev wrote:
> If I run the following program (using Python 3.8.3 on a Windows 10 laptop):
>
> import sys, time
> for i in range(1,11):
> sys.stdout.write('\r%d' % i)
In Python 2, the 'write()` method returns None, which is suppres
On 2020-06-15 15:26, Ivan Pozdeev via Python-Dev wrote:
On 12.06.2020 11:01, Rob Cliffe via Python-Dev wrote:
If I run the following program (using Python 3.8.3 on a Windows 10
laptop):
import sys, time
for i in range(1,11):
sys.stdout.write('\r%d' % i)
time.sleep(1)
As intended, it
On 12.06.2020 11:01, Rob Cliffe via Python-Dev wrote:
If I run the following program (using Python 3.8.3 on a Windows 10 laptop):
import sys, time
for i in range(1,11):
sys.stdout.write('\r%d' % i)
time.sleep(1)
As intended, it displays '1', replacing it at 1-second intervals with '2',
On 6/12/20 4:01 AM, Rob Cliffe via Python-Dev wrote:
> If I run the following program (using Python 3.8.3 on a Windows 10
> laptop):
>
> import sys, time
> for i in range(1,11):
> sys.stdout.write('\r%d' % i)
> time.sleep(1)
>
> As intended, it displays '1', replacing it at 1-second interva
> Now run the same code inside the REPL:
>
> Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32
> bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys, time
> >>> for i in range(1,11):
> ... sys.stdout.write('\r%