How can i detect that something is plugged in to the audio jack on linux with python?
I am using the python tornado webserver with tornado.io.
I want to prove that i can send events asynchronously via tornado.io.
How can i simply detect that somethi开发者_运维百科ng is plugged in the audio jack and send a message in tornado.io?
The idea is to find what is your sound card, then google for 'jack sensing for your audio_card_number" after that it is simple
import os
os.system("your_comand")
To get you started, here is a python script which does for the ac97 card. Your solution should be similar.
精彩评论