IO#
Input/Output operations for streams produced by DevTools.
Types#
Generally, you do not need to instantiate CDP types yourself. Instead, the API creates objects for you as return values from commands, and then you can use those objects as arguments to other commands.
Commands#
Each command is a generator function. The return
type Generator[x, y, z] indicates that the generator
yields arguments of type x, it must be resumed with
an argument of type y, and it returns type z. In
this library, types x and y are the same for all
commands, and z is the return type you should pay attention
to. For more information, see
Getting Started: Commands.
- read(handle, offset=None, size=None)[source]#
Read a chunk of the stream
- Parameters:
handle (
StreamHandle) – Handle of the stream to read.offset (
Optional[int]) – (Optional) Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.size (
Optional[int]) – (Optional) Maximum number of bytes to read (left upon the agent discretion if not specified).
- Return type:
Generator[Dict[str,Any],Dict[str,Any],Tuple[Optional[bool],str,bool]]- Returns:
A tuple with the following items:
base64Encoded - (Optional) Set if the data is base64-encoded
data - Data that were read.
eof - Set if the end-of-file condition occurred while reading.
Events#
There are no events in this module.