File: remove-user-ctl.py

package info (click to toggle)
python-pyalsa 1.2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 496 kB
  • sloc: ansic: 5,616; python: 1,260; makefile: 4
file content (13 lines) | stat: -rwxr-xr-x 296 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /usr/bin/python
# -*- Python -*-

from pyalsa.alsahcontrol import HControl, Element, Info

hctl = HControl(name='hw:1')
list = hctl.list()
for id in list:
	elem = Element(hctl, id[1:])
	info = Info(elem)
	if info.is_user:
		print 'Removing element %s' % repr(id)
		hctl.element_remove(id[1:])