Re: Silly question, where is read() documented?

2020-08-30 Thread Chris Green
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

Re: Silly question, where is read() documented?

2020-08-29 Thread Terry Reedy
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

Re: Silly question, where is read() documented?

2020-08-29 Thread Cameron Simpson
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

Re: Silly question, where is read() documented?

2020-08-29 Thread Ian Hobson
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

Re: Silly question about pip

2015-09-10 Thread breamoreboy
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 > > >

Re: Silly question about pip

2015-09-08 Thread Irmen de Jong
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

Re: Silly question

2009-08-21 Thread David C . Ullrich
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

Re: Silly question

2009-08-21 Thread David C Ullrich
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

Re: Silly question

2009-08-21 Thread David C Ullrich
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

Re: Silly question

2009-08-21 Thread David C Ullrich
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

Re: Silly question

2009-08-20 Thread John Machin
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

Re: Silly question

2009-08-20 Thread Aahz
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

Re: Silly question

2009-08-20 Thread David C Ullrich
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 >> -

Re: Silly question

2009-08-20 Thread David C Ullrich
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

Re: Silly question

2009-08-20 Thread Duncan Booth
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

Re: Silly question

2009-08-20 Thread Benjamin Kaplan
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

Re: Silly question re: 'for i in sys.stdin'?

2005-04-04 Thread Tom Eastman
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

Re: Silly question re: 'for i in sys.stdin'?

2005-04-04 Thread Steven Bethard
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

Re: Silly question re: 'for i in sys.stdin'?

2005-04-04 Thread Jeff Epler
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

Re: Silly question re: 'for i in sys.stdin'?

2005-04-03 Thread Steven Bethard
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

Re: Silly question re: 'for i in sys.stdin'?

2005-04-03 Thread Jeff Epler
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

Re: Silly question re: 'for i in sys.stdin'?

2005-04-03 Thread David Trudgett
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