Terry Reedy <tjre...@udel.edu> 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, but must at least have a .read method. > > > So where is it documented? :-) > > >>> import sys; sys.stdin > should give a hint. In the standard REPL, > > <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'> > > As others said, actually look in the io module doc. You might spend > some time reading the doc to get an idea of what is going on. If you > run from IDLE, you currently get > > <idlelib.run.StdInputFile object at 0x00000243F6D6FBB0> > (I should make that more like the REPL answer.) > Yes, quite! :-)
All I actually wanted to find out was the difference between what is returned by sys.stdin.read() in Python 2 and Python 3 as that turned out to be the fundamental cause of the mail handling problem I have been airing in other threads here. -- Chris Green ยท -- https://mail.python.org/mailman/listinfo/python-list