package scipy

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Mio5.BytesIOSource

Sourcetype tag = [
  1. | `BytesIO
]
Sourcetype t = [ `BytesIO | `Object ] Obj.t
Sourceval of_pyobject : Py.Object.t -> t
Sourceval to_pyobject : [> tag ] Obj.t -> Py.Object.t
Sourceval create : ?initial_bytes:Py.Object.t -> unit -> t

Buffered I/O implementation using an in-memory bytes buffer.

Sourceval __iter__ : [> tag ] Obj.t -> Py.Object.t

Implement iter(self).

Sourceval close : [> tag ] Obj.t -> Py.Object.t

Disable all I/O operations.

Sourceval detach : [> tag ] Obj.t -> Py.Object.t

Disconnect this buffer from its underlying raw stream and return it.

After the raw stream has been detached, the buffer is in an unusable state.

Sourceval fileno : [> tag ] Obj.t -> Py.Object.t

Returns underlying file descriptor if one exists.

OSError is raised if the IO object does not use a file descriptor.

Sourceval flush : [> tag ] Obj.t -> Py.Object.t

Does nothing.

Sourceval getbuffer : [> tag ] Obj.t -> Py.Object.t

Get a read-write view over the contents of the BytesIO object.

Sourceval getvalue : [> tag ] Obj.t -> Py.Object.t

Retrieve the entire contents of the BytesIO object.

Sourceval isatty : [> tag ] Obj.t -> Py.Object.t

Always returns False.

BytesIO objects are not connected to a TTY-like device.

Sourceval read : ?size:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Read at most size bytes, returned as a bytes object.

If the size argument is negative, read until EOF is reached. Return an empty bytes object at EOF.

Sourceval read1 : ?size:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Read at most size bytes, returned as a bytes object.

If the size argument is negative or omitted, read until EOF is reached. Return an empty bytes object at EOF.

Sourceval readable : [> tag ] Obj.t -> Py.Object.t

Returns True if the IO object can be read.

Sourceval readinto : buffer:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Read bytes into buffer.

Returns number of bytes read (0 for EOF), or None if the object is set not to block and has no data to read.

Sourceval readinto1 : buffer:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

None

Sourceval readline : ?size:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Next line from the file, as a bytes object.

Retain newline. A non-negative size argument limits the maximum number of bytes to return (an incomplete line may be returned then). Return an empty bytes object at EOF.

Sourceval readlines : ?size:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

List of bytes objects, each a line from the file.

Call readline() repeatedly and return a list of the lines so read. The optional size argument, if given, is an approximate bound on the total number of bytes in the lines returned.

Sourceval seek : ?whence:Py.Object.t -> pos:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Change stream position.

Seek to byte offset pos relative to position indicated by whence: 0 Start of stream (the default). pos should be >= 0; 1 Current position - pos may be negative; 2 End of stream - pos usually negative. Returns the new absolute position.

Sourceval seekable : [> tag ] Obj.t -> Py.Object.t

Returns True if the IO object can be seeked.

Sourceval tell : [> tag ] Obj.t -> Py.Object.t

Current file position, an integer.

Sourceval truncate : ?size:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Truncate the file to at most size bytes.

Size defaults to the current file position, as returned by tell(). The current file position is unchanged. Returns the new size.

Sourceval writable : [> tag ] Obj.t -> Py.Object.t

Returns True if the IO object can be written.

Sourceval write : b:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Write bytes to file.

Return the number of bytes written.

Sourceval writelines : lines:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Write lines to the file.

Note that newlines are not added. lines can be any iterable object producing bytes-like objects. This is equivalent to calling write() for each element.

Sourceval to_string : t -> string

Print the object to a human-readable representation.

Sourceval show : t -> string

Print the object to a human-readable representation.

Sourceval pp : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.