Terry Reedy wrote:
> On 8/29/2020 12:18 PM, Chris Green wrote:
> > Well it sounds a silly question but I can't find the documentation for
> > read(). It's not a built-in function and it's not documented with
> > (for example) the file type object sys.stdin.
>
> sys.stdin is of no particular type
On 8/29/2020 12:18 PM, Chris Green wrote:
Well it sounds a silly question but I can't find the documentation for
read(). It's not a built-in function and it's not documented with
(for example) the file type object sys.stdin.
sys.stdin is of no particular type, but must at least have a .read me
Also:
https://docs.python.org/3/library/io.html#io.TextIOBase.read
https://docs.python.org/3/library/io.html#io.BufferedIOBase.read
Found by going to:
https://docs.python.org/3/
https://docs.python.org/3/genindex.html
https://docs.python.org/3/genindex-R.html
and finding the
https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects
(It is in the top result returned by Google, searching for
Python read documentation)
On 29/08/2020 17:18, Chris Green wrote:
Well it sounds a silly question but I can't find the documentation for
read(). It's not a
On Wednesday, September 9, 2015 at 10:06:31 AM UTC+1, wxjm...@gmail.com wrote:
> Le mardi 8 septembre 2015 21:02:31 UTC+2, wxjm...@gmail.com a écrit :
> > Le mardi 8 septembre 2015 20:18:20 UTC+2, Irmen de Jong a écrit :
> > > On 8-9-2015 17:54, wxjmfa...@gmail.com wrote:
> > > > win7 / py433
> > >
On 8-9-2015 17:54, wxjmfa...@gmail.com wrote:
> win7 / py433
>
> How to downgrade from the latest pip (7.1.2) to
> the previous one?
> I'm sorry, I do not remember the numerous msgs
> I saw when updating. (Yesterday)
>
> (I'm serious)
>
> Now, what?
>
I think:
$ pip install --upgrade pip==7.0
On Fri, 21 Aug 2009 14:45:55 -0500, David C Ullrich
wrote:
>[...]
>
>Oops. Should have tested that a little more carefully
>before posting. No time to fix it right now, customer just
>got here. Let's just say we're looking for the primes
>between sqrt(n) and n...
from math import sqrt
def Prime
On Fri, 21 Aug 2009 14:40:30 -0500, David C Ullrich wrote:
> On Thu, 20 Aug 2009 16:51:00 -0700, Aahz wrote:
>
>> In article ,
>> Benjamin Kaplan wrote:
>>>On Thu, Aug 20, 2009 at 2:13 PM, David C Ullrich
>>>wrot= e:
I just noticed that
sequence[i:j:k]
>>>
>>>Well, I got some goo
On Thu, 20 Aug 2009 16:51:00 -0700, Aahz wrote:
> In article ,
> Benjamin Kaplan wrote:
>>On Thu, Aug 20, 2009 at 2:13 PM, David C Ullrich
>>wrot= e:
>>>
>>> I just noticed that
>>> sequence[i:j:k]
>>
>>Well, I got some good news and some bad news. According to the docs, it
>>existed in 1.4 but
On Thu, 20 Aug 2009 17:45:11 -0700, John Machin wrote:
> On Aug 21, 5:33 am, David C Ullrich wrote:
>
>> So I'm slow, fine. (There were several times when I was using 1.5.3 and
>> wished they were there - transposing matrices, etc.)
>
> 1.5.THREE ??
Not sure. 1.SOMETHING. Sorry about the CONFU
On Aug 21, 5:33 am, David C Ullrich wrote:
> So I'm slow, fine. (There were several times when I was using 1.5.3
> and wished they were there - transposing matrices, etc.)
1.5.THREE ??
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Benjamin Kaplan wrote:
>On Thu, Aug 20, 2009 at 2:13 PM, David C Ullrich wrot=
>e:
>>
>> I just noticed that
>> sequence[i:j:k]
>
>Well, I got some good news and some bad news. According to the docs,
>it existed in 1.4 but the built-in sequences didn't support it until
>2.3. It's not
On Thu, 20 Aug 2009 14:36:35 -0400, Benjamin Kaplan wrote:
> On Thu, Aug 20, 2009 at 2:13 PM, David C Ullrich
> wrote:
>> I just noticed that
>>
>> sequence[i:j:k]
>>
>> syntax in a post here. When did this happen?
>>
>> (I'm just curious whether it existed in 1.5.x or not. If so I'm stupid
>> -
On Thu, 20 Aug 2009 18:41:34 +, Duncan Booth wrote:
> David C Ullrich wrote:
>
>> I just noticed that
>>
>> sequence[i:j:k]
>>
>> syntax in a post here. When did this happen?
>>
>> (I'm just curious whether it existed in 1.5.x or not. If so I'm stupid
>> - otoh if it was introduced in 2
David C Ullrich wrote:
> I just noticed that
>
> sequence[i:j:k]
>
> syntax in a post here. When did this happen?
>
> (I'm just curious whether it existed in 1.5.x or not.
> If so I'm stupid - otoh if it was introduced in 2.x
> I'm just slow...)
>
>
Googling for 'python extended slice' ret
On Thu, Aug 20, 2009 at 2:13 PM, David C Ullrich wrote:
> I just noticed that
>
> sequence[i:j:k]
>
> syntax in a post here. When did this happen?
>
> (I'm just curious whether it existed in 1.5.x or not.
> If so I'm stupid - otoh if it was introduced in 2.x
> I'm just slow...)
>
Well, I got some
Jeff Epler wrote:
> The iterator for files is a little bit like this generator function:
>
Cool thanks for that, it looks like iter(f.readline, '') is the best
solution for the job.
Tom
--
http://mail.python.org/mailman/listinfo/python-list
Jeff Epler wrote:
On Sun, Apr 03, 2005 at 09:49:42PM -0600, Steven Bethard wrote:
Slick. Thanks!
does isatty() actually work on windows? I'm a tiny bit surprised!
Hmm... I was just talking about using iter(f.readline, ''), but it does
appear that isatty returns True for sys.stdin in the interac
On Sun, Apr 03, 2005 at 09:49:42PM -0600, Steven Bethard wrote:
> Slick. Thanks!
does isatty() actually work on windows? I'm a tiny bit surprised!
Jeff
pgp2TeZpqhdyV.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Jeff Epler wrote:
The iterator for files is a little bit like this generator function:
def lines(f):
while 1:
chunk = f.readlines(sizehint)
for line in chunk: yield line
Inside file.readlines, the read from the tty will block until sizehint
bytes have been read o
The iterator for files is a little bit like this generator function:
def lines(f):
while 1:
chunk = f.readlines(sizehint)
for line in chunk: yield line
Inside file.readlines, the read from the tty will block until sizehint
bytes have been read or EOF is seen.
If
I'm not a Python expert by any means, but you're describing the
classic symptoms of buffering. There is a '-u' command line switch for
python to turn off buffering but that does not affect file iterators.
See http://www.hmug.org/man/1/python.html for instance.
Tom Eastman <[EMAIL PROTECTED]> wri
22 matches
Mail list logo