From 2340f30dd90c404d6a02835885616f7b5361e2f6 Mon Sep 17 00:00:00 2001 From: Olli Date: Sat, 14 Apr 2012 13:26:27 +0200 Subject: [PATCH] Paket und Klasse ?MPDCoverGrid? erstellt --- MPDCoverGrid.py | 27 +++++++++++++++++++++++++++ __init__.py | 5 +++++ 2 files changed, 32 insertions(+) create mode 100644 MPDCoverGrid.py create mode 100644 __init__.py diff --git a/MPDCoverGrid.py b/MPDCoverGrid.py new file mode 100644 index 0000000..cecba3b --- /dev/null +++ b/MPDCoverGrid.py @@ -0,0 +1,27 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + + + +from mpd import MPDClient + + + + +class MPDCoverGrid: + def __init__(self, host='localhost', port='6600', password=None): + self._host = host + self._port = port + self._password = password + self.client = MPDClient() + + + def connect(self): + self.client.connect(self._host, self._port) + if self._password: + self.client.password(self._password) + + + def disconnect(self): + self.client.disconnect() + diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..396cef0 --- /dev/null +++ b/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + + +