block devices

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rick

    #1

    block devices

    What's the best way to read a byte of data directly from a block device
    (a scsi hard drive) on Linux using Python?
  • Diez B. Roggisch

    #2
    Re: block devices

    rick schrieb:
    What's the best way to read a byte of data directly from a block device
    (a scsi hard drive) on Linux using Python?
    Reading it? Using read?

    f = open("/dev/foo")
    f.read(1)

    Diez

    Comment

    • rick

      #3
      Re: block devices

      Diez B. Roggisch wrote:
      Reading it? Using read?
      >
      f = open("/dev/foo")
      f.read(1)
      >
      Diez
      Wow, I didn't realize it was that simple. Thanks!

      Comment

      Working...