Esempio n. 1
0
    def __init__(self, downloaddir='./downloads', entityid=None, DEBUG=False):
        #threading.Thread.__init__(self)

        self._stop = threading.Event()
        self._interval = 1

        self.downloaddir = downloaddir
        self.entityid = entityid
        self.DEBUG = DEBUG

        if self.DEBUG:
            if self.entityid != None:
                print "Using conditional EntityID."

        self.unpdfer = Unpdfer()

        #self.searchapi = Search()
        self.myid = str(uuid.uuid4())
        self.dbaccess = Access(DEBUG=True)

        # setup access layer
        #self.myid = str(uuid.uuid4())
        #self.busaccess = BusAccess(myid=self.myid,DEBUG=True)
        #self.busaccess.setcallback(self._callback)

        # start seperate thread with listener in it
        #self.listenthread = threading.Thread(target=self.busaccess.listen)
        #self.listenthread.start()

        if self.DEBUG:
            print "Converter INIT completed successfully."