Checking for the status of a device (before connection)... -- (JohnMcCormick)

M

Mccormick.Johnw

Hello, ... I am John McCormick (Systems Programmer ) and I am currently
working on a python program which will connect (user) specified inputs
and connect them to (user) selected outputs (like screen or
video/audio-recording devices) and would like to know if there's a
technique to "test" or "sense" if the desired output device is busy
without interrupting the output device while checking to see if it's
busy... ?? If, perhaps, python does not have this type of feature, I
wonder if you could give me some type of direction (ie., manufacturer's
device response checking techniques that could be used in conjunction
with python) but the bottom line is not to "crash" or interrupt the
desired output device (if it's still busy)...

Thank You



John McCormick



##############################################
John W. McCormick, Systems Programmer / DBA
High Performance Computing & Scientific Visualization
Lockheed Martin Information Technology, Supporting the EPA
Research Triangle Park, NC
919-541-0890

Federal Infrastructure Contact - Ravi Nair
919-541-5467 - (e-mail address removed)
Federal Infrastructure Contact - Joe Retzer, Ph.D.
919-541-4190 - (e-mail address removed)
 
M

Mike Meyer

Hello, ... I am John McCormick (Systems Programmer ) and I am currently
working on a python program which will connect (user) specified inputs
and connect them to (user) selected outputs (like screen or
video/audio-recording devices) and would like to know if there's a
technique to "test" or "sense" if the desired output device is busy
without interrupting the output device while checking to see if it's
busy... ?? If, perhaps, python does not have this type of feature, I
wonder if you could give me some type of direction (ie., manufacturer's
device response checking techniques that could be used in conjunction
with python) but the bottom line is not to "crash" or interrupt the
desired output device (if it's still busy)...

That's a very device - and platform! - specific thing to want to
do. On Unix, you would typically open() the /dev/device file and
perform an ioctl on it to see if it was busy - assuming it supported
that kind of operation at all. The exact ioctl call would depend on
the device, as there really isn't a standard for them.

<mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,785
Messages
2,569,624
Members
45,319
Latest member
LorenFlann

Latest Threads

Top