Path.read_bytes()
Return the binary contents of the pointed-to file as a bytes object:
1 2 3 4 5 | >>> p = Path( 'my_binary_file' ) >>> p.write_bytes(b 'Binary file contents' ) 20 >>> p.read_bytes() b 'Binary file contents' |
New in version 3.5.
Path.read_bytes()
Return the binary contents of the pointed-to file as a bytes object:
1 2 3 4 5 | >>> p = Path( 'my_binary_file' ) >>> p.write_bytes(b 'Binary file contents' ) 20 >>> p.read_bytes() b 'Binary file contents' |
New in version 3.5.
Designed by : w10schools
service@w10schools.com
Please login to continue.