pytorch_pfn_extras.onnx.load.IO#

class pytorch_pfn_extras.onnx.load.IO(*args, **kwds)#

Bases: Generic

Generic base class for TextIO and BinaryIO.

This is an abstract, generic version of the return of open().

NOTE: This does not distinguish between the different possible classes (text vs. binary, read vs. write vs. read/write, append-only, unbuffered). The TextIO and BinaryIO subclasses below capture the distinctions between text vs. binary, which is pervasive in the interface; however we currently do not offer a way to track the other distinctions in the type system.

Methods

__init__()

close()

fileno()

flush()

isatty()

read([n])

readable()

readline([limit])

readlines([hint])

seek(offset[, whence])

seekable()

tell()

truncate([size])

writable()

write(s)

writelines(lines)

Attributes

closed

mode

name

abstract close()#
Return type:

None

abstract property closed: bool#
abstract fileno()#
Return type:

int

abstract flush()#
Return type:

None

abstract isatty()#
Return type:

bool

abstract property mode: str#
abstract property name: str#
abstract read(n=-1)#
Parameters:

n (int) –

Return type:

AnyStr

abstract readable()#
Return type:

bool

abstract readline(limit=-1)#
Parameters:

limit (int) –

Return type:

AnyStr

abstract readlines(hint=-1)#
Parameters:

hint (int) –

Return type:

List

abstract seek(offset, whence=0)#
Parameters:
  • offset (int) –

  • whence (int) –

Return type:

int

abstract seekable()#
Return type:

bool

abstract tell()#
Return type:

int

abstract truncate(size=None)#
Parameters:

size (Optional[int]) –

Return type:

int

abstract writable()#
Return type:

bool

abstract write(s)#
Parameters:

s (AnyStr) –

Return type:

int

abstract writelines(lines)#
Parameters:

lines (List) –

Return type:

None