Name
write
Synopsis
m
.write(str
)
Writes
the bytes in str
into
m
and at the current position of
m
’s file pointer,
overwriting the bytes that were there, and then advances
m
’s file pointer by
len(
str
)
.
If there aren’t at least
len(
str
)
bytes between m
’s file
pointer and the length of m
,
write
raises a ValueError
exception.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.