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()
21 def mpdConnect(self, con_id):#{{{
23 Simple wrapper to connect MPD.
24 con_id = {'host': 'MPD_server', 'port': 'MPD_server port'}
27 self.client.connect(**con_id)
32 def mpdAuth(self, secret):#{{{
35 self.client.password(secret)
45 if __name__ == '__main__':
49 # vim: ai ts=4 sw=4 sts=4 expandtab