help() on stdout.closed

Nick Craig-Wood nick at craig-wood.com
Wed Jun 21 13:30:03 EDT 2006


Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
>  In <slrne9ibq3.jer.pkarjala at lastu30.oulu.fi>, Pekka Karjalainen wrote:
> 
> > Suppose I had no idea what sys.stdout.closed was and wanted to find out. 
> > Where would I look it up?
> 
>  `sys.stdout` is a file (like) object:
> 
>  http://docs.python.org/lib/bltin-file-objects.html

Since the OP is using linux he may prefer to look this up using
"info".  Info contains all the same stuff as the web pages and it is
terminal friendly.

To find the below I typed

info
CTRL-S pytho
Cursor down to "Python2.3-lib:" and press ENTER
CTRL-S closed
CTRL-S, CTRL-S until correct entry found (the 4th one)

...

File objects also offer a number of other interesting attributes.
These are not required for file-like objects, but should be implemented
if they make sense for the particular object.

`closed'
     bool indicating the current state of the file object.  This is a
     read-only attribute; the `close()' method changes the value.  It
     may not be available on all file-like objects.

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list