def alsaUsed(self, standard = 2): result = [] f = os.popen("fuser /dev/snd/* /dev/dsp* /dev/snd/*", "r") # Count lines of output, if more then standard then sound is used! l = len(f.readlines()) if > standard: result = ["Used"] return result