Name
body
Synopsis
n
.body(id
,file
)
id
is a
string, either an article ID enclosed in angle brackets
(<>
) or an article number in the current
group. Returns a tuple of three strings and a list
(
response
,number,id,list
)
,
where number
is the article number in the
current group, id
is the article ID
enclosed in angle brackets, and list
is a
list of strings that are the lines in the article’s
body, without end-of-line characters. When
file
is not None
, it
can be either a string naming a file that head
then opens for writing, or a file object already open for writing. In
either case, body
writes the
article’s body to the file, and
list
in the tuple it returns is an empty
list.
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.