2 # -*- coding: utf-8 -*-
5 from socket import error as SocketError
8 from mpd import (MPDClient, CommandError)
9 except ImportError, err:
10 print 'ERROR: "%s"\n\nPlease install python-mpd module.\n' % err
14 class MPDClass(object):
15 """Connect to MPD server
19 self.client = MPDClient()
23 Simple wrapper to connect MPD.
25 con_id = dict({'host': self.cli_options.host,
26 'port': self.cli_options.port})
28 self.client.connect(**con_id)
33 def mpdAuth(self, secret):
36 self.client.password(secret)
46 if __name__ == '__main__':
50 # vim: ai ts=4 sw=4 sts=4 expandtab