Writes the given value and returns the number of bytes written to the specified file output stream, piped output stream, print stream, data output stream, data output, output stream or random access file object.
Syntax
write( outputstream , byte )
outputstream.write( byte )
write( outputstream , bytearray )
outputstream.write( bytearray )
write( outputstream , string )
outputstream.write( string )
write( outputstream , bytearray , offset , length )
outputstream.write( bytearray , offset , length )
write( outputstream , string , offset , length )
outputstream.write( string , offset , length )
Parameters
outputstream
|
the file output stream, piped output stream, print stream, random access file , data output stream, data output or output stream object to write to.
|
bytearray
|
the byte array object write.
|
string
|
the string to write.
|
offset
|
a starting offset.
|
length
|
the number of bytes to write.
|
Returns
Example
fh.write( buf )
|