How to use sys.stdout

Roman Kaminski romankaminski at
Thu Nov 4 15:24:44 CET 2004

"Leon" <square690410 at> wrote in message news:<cmclfi$cgm$1 at>...
> what does it have properties ?
> what does it have method ?
> how to use they ? or where can find any information
> please help me

An example:

Python 2.3.3 (#1, May  3 2004, 20:19:41) 
[GCC 3.3.1] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> dir( sys.stdout)
['__class__', '__delattr__', '__doc__', '__getattribute__',
'__hash__', '__init_                  _', '__iter__', '__new__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr                 
__', '__str__', 'close', 'closed', 'encoding', 'fileno', 'flush',
'isatty', 'mod                  e', 'name', 'newlines', 'next',
'read', 'readinto', 'readline', 'readlines', 'se                  ek',
'softspace', 'tell', 'truncate', 'write', 'writelines', 'xreadlines']
>>> sys.stdout.write( 'hello world\n')
hello world

Good luck,
Roman Kaminski

More information about the Python-list mailing list