Overview:
- The function os.pread() reads specified number of bytes or less starting from a specified position at a file.
- It returns an empty bytes object when end of file is reached.
Example:
# Example Python program that reads # Open the file that has the text # Read the whole line that starts with Merrily bytesRead = os.pread(fd, bytesCount, readFrom) # Print the read bytes |
Output:
b'Merrily merrily, merrily, merrily\n' |