Top Fields Constructors Methods
org.python.modules._io

public Class PyFileIODerived

extends PyFileIO
implements Slotted, FinalizablePyObjectDerived, TraverseprocDerived
Class Inheritance
All Implemented Interfaces
org.python.core.TraverseprocDerived, org.python.core.finalization.FinalizablePyObjectDerived, org.python.core.Slotted
Imports
java.io.Serializable, org.python.core.*, org.python.core.finalization.FinalizeTrigger, .FinalizablePyObjectDerived

Field Summary

Modifier and TypeField and Description
private PyObject[]
Inherited from org.python.modules._io.PyFileIO:
closefdmodeTYPE

Constructor Summary

AccessConstructor and Description
public
PyFileIODerived(PyType subtype, PyObject file, OpenMode mode, boolean closefd)

Method Summary

Modifier and TypeMethod and Description
public PyObject
__abs__()

Overrides org.python.core.PyObject.__abs__.

Equivalent to the standard Python __abs__ method.

public PyObject
__add__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__add__.

Equivalent to the standard Python __add__ method.

public PyObject
__and__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__and__.

Equivalent to the standard Python __and__ method

public PyObject
__call__(PyObject[]
all arguments to the function (including keyword arguments).
args
,
String[]
the keywords used for all keyword arguments.
keywords
)

Overrides org.python.core.PyObject.__call__.

The basic method to override when implementing a callable object.

public int
__cmp__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__cmp__.

Equivalent to the standard Python __cmp__ method.

public Object
__coerce_ex__(PyObject
the other object involved in the coercion
o
)

Overrides org.python.core.PyObject.__coerce_ex__.

Implements numeric coercion

public PyComplex
__complex__()

Overrides org.python.core.PyObject.__complex__.

Equivalent to the standard Python __complex__ method.

public boolean
__contains__(PyObject
the element to search for in this container.
o
)

Overrides org.python.core.PyObject.__contains__.

Equivalent to the standard Python __contains__ method.

public void
__del_derived__()

Implements org.python.core.finalization.FinalizablePyObjectDerived.__del_derived__.

__del_builtin__ is the built-in's own finalizer, while __del_derived__ refers to an instance's in-dict __del__.

public void
__delattr__(String
the name which will be removed - must be an interned string .
name
)

Overrides org.python.core.PyObject.__delattr__.

A variant of the __delattr__ method which accepts a String as the key.

public void
public void
__delitem__(PyObject
the key to be removed from the container
key
)

Overrides org.python.core.PyObject.__delitem__.

Equivalent to the standard Python __delitem__ method.

public void
public PyObject
__dir__()

Overrides org.python.core.PyObject.__dir__.

Equivalent to the standard Python __dir__ method.

public PyObject
__div__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__div__.

Equivalent to the standard Python __div__ method

public PyObject
__divmod__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__divmod__.

Equivalent to the standard Python __divmod__ method

public void
__ensure_finalizer__()

Overrides org.python.core.PyObject.__ensure_finalizer__.

PyObjects that implement org.python.core.finalization.HasFinalizeTrigger shall implement this method via: FinalizeTrigger.ensureFinalizer(this);

public PyObject
__enter__()

Overrides org.python.modules._io.PyIOBase.__enter__.

Called at the start of a context-managed suite (supporting the with clause).

public PyObject
__eq__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__eq__.

Equivalent to the standard Python __eq__ method.

public boolean
__exit__(PyObject type, PyObject value, PyObject traceback)

Overrides org.python.modules._io.PyIOBase.__exit__.

Called at the end of a context-managed suite (supporting the with clause), and will normally close the stream.

public PyObject
__findattr_ex__(String name)

Overrides org.python.core.PyObject.__findattr_ex__.

Attribute lookup hook.

public PyObject
__finditem__(PyObject
the key to lookup in this container
key
)

Overrides org.python.core.PyObject.__finditem__.

Very similar to the standard Python __getitem__ method.

public PyObject
__finditem__(int
the key to lookup in this sequence.
key
)

Overrides org.python.core.PyObject.__finditem__.

A variant of the __finditem__ method which accepts a primitive int as the key.

public PyFloat
__float__()

Overrides org.python.core.PyObject.__float__.

Equivalent to the standard Python __float__ method.

public PyObject
__floordiv__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__floordiv__.

Equivalent to the standard Python __floordiv__ method

public PyObject
public PyObject
__ge__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__ge__.

Equivalent to the standard Python __ge__ method.

public PyObject
__get__(PyObject
- the instance accessing this descriptor. Can be null if this is being accessed by a type.
obj
,
PyObject
- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.
type
)

Overrides org.python.core.PyObject.__get__.

Get descriptor for this PyObject.

public PyObject
__getitem__(PyObject
the key to lookup in this container.
key
)

Overrides org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method.

public PyObject
public PyObject
__gt__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__gt__.

Equivalent to the standard Python __gt__ method.

public PyString
__hex__()

Overrides org.python.core.PyObject.__hex__.

Equivalent to the standard Python __hex__ method Should only be overridden by numeric objects that can be reasonably represented as a hexadecimal string.

public PyObject
__iadd__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__iadd__.

Equivalent to the standard Python __iadd__ method.

public PyObject
__iand__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__iand__.

Equivalent to the standard Python __iand__ method

public PyObject
__idiv__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__idiv__.

Equivalent to the standard Python __idiv__ method

public PyObject
__ifloordiv__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__ifloordiv__.

Equivalent to the standard Python __ifloordiv__ method

public PyObject
__ilshift__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__ilshift__.

Equivalent to the standard Python __ilshift__ method

public PyObject
__imod__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__imod__.

Equivalent to the standard Python __imod__ method

public PyObject
__imul__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__imul__.

Equivalent to the standard Python __imul__ method.

public PyObject
__index__()

Overrides org.python.core.PyObject.__index__.

Equivalent to the standard Python __index__ method.

public PyObject
__int__()

Overrides org.python.core.PyObject.__int__.

Equivalent to the standard Python __int__ method.

public PyObject
__invert__()

Overrides org.python.core.PyObject.__invert__.

Equivalent to the standard Python __invert__ method.

public PyObject
__ior__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__ior__.

Equivalent to the standard Python __ior__ method

public PyObject
__ipow__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__ipow__.

Equivalent to the standard Python __ipow__ method

public PyObject
__irshift__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__irshift__.

Equivalent to the standard Python __irshift__ method

public PyObject
__isub__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__isub__.

Equivalent to the standard Python __isub__ method

public PyObject
__iter__()

Overrides org.python.modules._io.PyIOBase.__iter__.

Return an iterator on which next may be repeatedly called to produce (usually) lines from this stream or file.

public PyObject
__iternext__()

Overrides org.python.modules._io.PyIOBase.__iternext__.

Return the next element of the sequence that this is an iterator for.

public PyObject
__itruediv__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__itruediv__.

Equivalent to the standard Python __itruediv__ method

public PyObject
__ixor__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__ixor__.

Equivalent to the standard Python __ixor__ method

public PyObject
__le__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__le__.

Equivalent to the standard Python __le__ method.

public int
__len__()

Overrides org.python.core.PyObject.__len__.

Equivalent to the standard Python __len__ method.

public PyObject
__long__()

Overrides org.python.core.PyObject.__long__.

Equivalent to the standard Python __long__ method.

public PyObject
__lshift__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__lshift__.

Equivalent to the standard Python __lshift__ method

public PyObject
__lt__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__lt__.

Equivalent to the standard Python __lt__ method.

public PyObject
__mod__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__mod__.

Equivalent to the standard Python __mod__ method

public PyObject
__mul__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__mul__.

Equivalent to the standard Python __mul__ method.

public PyObject
__ne__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__ne__.

Equivalent to the standard Python __ne__ method.

public PyObject
__neg__()

Overrides org.python.core.PyObject.__neg__.

Equivalent to the standard Python __neg__ method.

public boolean
__nonzero__()

Overrides org.python.core.PyObject.__nonzero__.

Equivalent to the standard Python __nonzero__ method.

public PyString
__oct__()

Overrides org.python.core.PyObject.__oct__.

Equivalent to the standard Python __oct__ method.

public PyObject
__or__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__or__.

Equivalent to the standard Python __or__ method

public PyObject
__pos__()

Overrides org.python.core.PyObject.__pos__.

Equivalent to the standard Python __pos__ method.

public PyObject
__pow__(PyObject
the power to raise this number to.
other
,
PyObject
the modulus to perform this operation in or null if no modulo is to be used
modulo
)

Overrides org.python.core.PyObject.__pow__.

Implements the three argument power function.

public PyObject
__radd__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__radd__.

Equivalent to the standard Python __radd__ method.

public PyObject
__rand__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rand__.

Equivalent to the standard Python __rand__ method

public PyObject
__rdiv__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rdiv__.

Equivalent to the standard Python __rdiv__ method

public PyObject
__rdivmod__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rdivmod__.

Equivalent to the standard Python __rdivmod__ method

public PyObject
__reduce__()

Overrides org.python.core.PyObject.__reduce__.

Used for pickling.

public PyString
__repr__()

Overrides org.python.core.PyObject.__repr__.

Equivalent to the standard Python __repr__ method.

public PyObject
__rfloordiv__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rfloordiv__.

Equivalent to the standard Python __rfloordiv__ method

public PyObject
__rlshift__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rlshift__.

Equivalent to the standard Python __rlshift__ method

public PyObject
__rmod__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rmod__.

Equivalent to the standard Python __rmod__ method

public PyObject
__rmul__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rmul__.

Equivalent to the standard Python __rmul__ method.

public PyObject
__ror__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__ror__.

Equivalent to the standard Python __ror__ method

public PyObject
__rpow__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rpow__.

Equivalent to the standard Python __rpow__ method

public PyObject
__rrshift__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rrshift__.

Equivalent to the standard Python __rrshift__ method

public PyObject
__rshift__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__rshift__.

Equivalent to the standard Python __rshift__ method

public PyObject
__rsub__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rsub__.

Equivalent to the standard Python __rsub__ method

public PyObject
__rtruediv__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rtruediv__.

Equivalent to the standard Python __rtruediv__ method

public PyObject
__rxor__(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Overrides org.python.core.PyObject.__rxor__.

Equivalent to the standard Python __rxor__ method

public void
public void
__setattr__(String
the name whose value will be set - must be an interned string .
name
,
PyObject
the value to set this name to
value
)

Overrides org.python.core.PyObject.__setattr__.

A variant of the __setattr__ method which accepts a String as the key.

public void
__setitem__(PyObject
the key whose value will be set
key
,
PyObject
the value to set this key to
value
)

Overrides org.python.core.PyObject.__setitem__.

Equivalent to the standard Python __setitem__ method.

public void
public PyString
__str__()

Overrides org.python.core.PyObject.__str__.

Equivalent to the standard Python __str__ method.

public PyObject
__sub__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__sub__.

Equivalent to the standard Python __sub__ method

public Object
__tojava__(Class<T>
the Class to convert this PyObject to.
c
)

Overrides org.python.core.PyObject.__tojava__.

Equivalent to the Jython __tojava__ method.

public PyObject
__truediv__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__truediv__.

Equivalent to the standard Python __truediv__ method

public PyUnicode
public PyObject
__xor__(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Overrides org.python.core.PyObject.__xor__.

Equivalent to the standard Python __xor__ method

public void
_checkClosed(String
optional custom message
msg
)

Overrides org.python.modules._io.PyIOBase._checkClosed.

Raise an error if the underlying IO stream is closed.

public void
_checkReadable(String
optional custom message
msg
)

Overrides org.python.modules._io.PyIOBase._checkReadable.

Raise an error if the underlying IO stream is not readable.

public void
_checkSeekable(String
optional custom message
msg
)

Overrides org.python.modules._io.PyIOBase._checkSeekable.

Raise an error if the pointer of underlying IO stream is not capable of being positioned.

public void
_checkWritable(String
optional custom message
msg
)

Overrides org.python.modules._io.PyIOBase._checkWritable.

Raise an error if the underlying IO stream is not writable.

public void
close()

Overrides org.python.modules._io.PyFileIO.close.

Close the underlying ioDelegate only if closefd was specified as (or defaulted to) True.

public void
dispatch__init__(PyObject[] args, String[] keywords)

Overrides org.python.core.PyObject.dispatch__init__.

Dispatch __init__ behavior

public PyObject
fileno()

Overrides org.python.modules._io.PyFileIO.fileno.

Return a file descriptor for the stream.

public void
flush()

Overrides org.python.modules._io.PyFileIO.flush.

Flush write buffers, or no-op for read-only and non-blocking streams.

public PyObject
public int
hashCode()

Overrides org.python.core.PyObject.hashCode.

Returns a hash code value for this object.

public boolean
isatty()

Overrides org.python.modules._io.PyFileIO.isatty.

Is the stream known to be an interactive console?

public PyObject
read(int
number of bytes to read (if possible)
n
)

Overrides org.python.modules._io.PyRawIOBase.read.

The read() method is implemented by calling readinto(); derived classes that want to support read() only need to implement readinto() as a primitive operation.

public boolean
readable()

Overrides org.python.modules._io.PyFileIO.readable.

Is the stream readable?

public PyObject
readall()

Overrides org.python.modules._io.PyRawIOBase.readall.

Read until end of file, using multiple read() operations on the underlying stream.

public PyObject
readinto(PyObject
byte array to try to fill
b
)

Overrides org.python.modules._io.PyFileIO.readinto.

Read up to len(b) bytes into bytearray b and return the number of bytes read.

public PyObject
readline()

Overrides org.python.modules._io.PyIOBase.readline.

Return one line of text (bytes terminates by '\n'), or the whole stream, whichever is shorter.

public PyObject
readline(int
maximum number of bytes (<0 means no limit)
limit
)

Overrides org.python.modules._io.PyIOBase.readline.

Return one line of text (bytes terminates by '\n'), or the specified number of bytes, or the whole stream, whichever is shortest.

public PyObject
readlines(PyObject
stop reading lines after this many bytes (if not EOF first)
hint
)

Overrides org.python.modules._io.PyIOBase.readlines.

Read a stream as a sequence of lines.

public long
seek(long
relative to the specified point
pos
,
int
0=from start, 1=from here, 2=from end
whence
)

Overrides org.python.modules._io.PyFileIO.seek.

Position the read or write pointer at a given byte offset pos relative to a position indicated by whence.

public boolean
seekable()

Overrides org.python.modules._io.PyFileIO.seekable.

Is the stream capable of positioning the read/write pointer?

public void
setSlot(int index, PyObject value)

Implements org.python.core.Slotted.setSlot.

public long
tell()

Overrides org.python.modules._io.PyIOBase.tell.

Get the current stream position.

public int
traverseDerived(Visitproc visit, Object arg)

Implements org.python.core.TraverseprocDerived.traverseDerived.

Traverses all reachable PyObjects.

public int
public long
truncate(long
requested for stream
size
)

Overrides org.python.modules._io.PyFileIO.truncate.

Truncate file to size bytes.

public long
truncate()

Overrides org.python.modules._io.PyFileIO.truncate.

Truncate file to size bytes to the current position (as reported by tell()).

public boolean
writable()

Overrides org.python.modules._io.PyFileIO.writable.

Is the stream writable?

public PyObject
write(PyObject
buffer of bytes to be written
b
)

Overrides org.python.modules._io.PyFileIO.write.

Write the given bytes or bytearray object to the underlying raw stream and return the number of bytes written.

public void
writelines(PyObject lines)

Overrides org.python.modules._io.PyIOBase.writelines.

Write an iterable sequence of strings to the stream.

Inherited from org.python.modules._io.PyFileIO:
FileIO___new__FileIO_closeFileIO_filenoFileIO_flushFileIO_isattyFileIO_readableFileIO_readintoFileIO_seekFileIO_seekableFileIO_toStringFileIO_truncateFileIO_writableFileIO_writemode_readonlytoString