Name

fromfile

Synopsis

                     a.fromfile(f,n)

Reads n items, taken as machine values, from file object f, and appends the items to a. Note that f should be open for reading in binary mode, for example with mode 'rb‘. When less than n items are available in f, fromfile raises EOFError after appending the items that are available.

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.