473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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?
Oct 17 '06 #1
2 4382
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
Oct 17 '06 #2
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!
Oct 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Harlan Messinger | last post by:
I thought I'd see what happened if I had a table used for layout with the class="flextable" and then defined .flextable td { display: block; } It "works" in current Windows-based browsers...
42
by: Jim Smith | last post by:
Note the cross-posting - but no flame wars please. This question was prompted by a thread on the a postgres mailing list during which someone (Gregory Williamson) claimed <quote> raw devices,...
0
by: gewe | last post by:
I am using the following code to enumerate devices on the local computer: ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * from Win32_PnPEntity");...
3
by: stacy | last post by:
I am developing an application that must look out over TCP on an ethernet connection to locate our proprietary devices. The Web application and the devices are communicating over ethernet with...
1
by: Rakeshkg | last post by:
Hi, I'd like to be able to temporarily block access to the cdrom/usb store/floppy drives and then reactivate them after a period of time. I have looked at several code that allows notifications of...
1
by: =?Utf-8?B?UmFrZXNoIEd1cHRh?= | last post by:
Hi guys, I'm looking for a way to temporarily disable the removable storage in Windows. This is useful in a lab situation where the instructor conducts a test and the devices can be disabled and...
0
by: zhensoftware | last post by:
USB storage devices have gained popularity. It can be host to viruses, Trojans, hacker toolkits, worms or other forms of malicious programs. For example, when you plug your USB disk into a computer...
2
by: Seongsu Lee | last post by:
Hi all, I want to get the size of a block device by ftell(). I found that I can get the size of a device by seek() and tell() in Python. But not in C. What is difference between them? How can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.