-2

Is there a way to perform low level read/write to disk using python. For example, read 1 byte starting at some given position.

  • Open the raw disk device as a file, seek to the position, and read. – Barmar Jul 02 '19 at 01:46
  • You should google a question and come up with some solution before asking a question here. Googling "read byte from file python" just gave me a handful of links explaining how to do it, including StackOverflow explanations, as well as the documentation on the Python site with what you need. – Grismar Jul 02 '19 at 02:29

1 Answers1

1

Just open disk path for binary read ("rb"), seek to position and then read(n) where n is number of bytes.

ipaleka
  • 3,745
  • 2
  • 13
  • 33