From 9a99cf1e7aab55c87022e87125dfe315645ad0e7 Mon Sep 17 00:00:00 2001 From: Philipp Rauch Date: Fri, 15 Nov 2013 16:08:41 +0100 Subject: [PATCH] =?UTF-8?q?swich=20Modul=20und=20ems=20Modul=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scr/ems.py | 12 ++++++++++++ scr/swich.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 scr/ems.py create mode 100644 scr/swich.py diff --git a/scr/ems.py b/scr/ems.py new file mode 100644 index 0000000..836de95 --- /dev/null +++ b/scr/ems.py @@ -0,0 +1,12 @@ +''' +Created on 15.11.2013 + +@author: Philipp Rauch +@version: 0.01 +''' +import threading +import Queue +import swich +from API import Buffer as buf + +foo = swich.Swich(swich.MYSQL) \ No newline at end of file diff --git a/scr/swich.py b/scr/swich.py new file mode 100644 index 0000000..10d06a5 --- /dev/null +++ b/scr/swich.py @@ -0,0 +1,45 @@ +''' +Created on 15.11.2013 + +@author: Philipp Rauch +@version: 0.01 +''' + +import MySQLdb +import threading +import Queue + +MYSQL = 0 +CSV = 1 +XML = 2 +JSON = 3 + +class Swich(object): + def __init__(self, source): + self.source = source + + def start(self): + if self.source == MYSQL: +# @TODO CANFilter starten + self.connection = MySQLdb.connect("url", "user", "passwort", "datenbankname") + self.cursor = self.connection.cursor() + self.queue = self.__createQueue__() + return self.queue + elif self.source ==CSV: + pass + elif self.source == XML: + pass + elif self.source == JSON: + pass + else: + return + def __createQueue__(self): + return + + def setQueue(self): + pass + + def getQueue(self): + pass + + \ No newline at end of file