f



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?
0
ath-admin (14)
10/17/2006 8:04:38 PM
comp.lang.python 77058 articles. 6 followers. Post Follow

2 Replies
244 Views

Similar Articles

[PageSpeed] 25

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
0
deets (3351)
10/17/2006 8:24:28 PM
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!
0
ath-admin (14)
10/17/2006 9:43:17 PM
Reply: