How can I query if a webcam is in use without physically asking openCV to turn it on briefly and return an error if it's in use?

Yep, you’re totally right that OP didn’t originally ask that, because this is an XY Problem and OP has no idea what they actually need. So instead they took the first idea on how to accomplish it, using some Python script, and are running into roadblocks, and are being told that is the wrong way to approach the problem.

But then all you morons want to hold their hand and try to “help” them by providing solutions to exactly what they asked, in reality you are pushing them further down a pointless rabbit hole because it’s the wrong way to approach the actual problem. If OP had originally just come out and asked for solutions to have an on-air notification, the entire discussion would have gone much smoother.

But yeah, go ahead and keep trying to be a white knight, because you’re being super helpful too. This is precisely why “beginner” subs like this are a cesspool of misinformation to new users. You have “just barely beyond beginner” level people trying to provide guidance to actual beginners, what great way to mislead people trying to learn.

Fully expect to be downvoted by the very morons I’m referring to. Prove me right :)

/r/learnpython Thread Parent