# Path: pyrikura/config.py
# def reload(path):


from ..config import Config as pkConfig
from PIL import Image as PIL_Image
from six.moves import queue
import socket
import threading
import logging
                queue_put(imdata)

        if self.thread is None:
            logger.debug('starting the preview handler')
            self.thread = threading.Thread(target=func)
            self.thread.daemon = True
            self.thread.start()

    def stop(self):
        if self.thread is None:
            logger.debug('want to stop preview thread, but is not running')
        else:
            logger.debug('stopping the preview handler')
            self.running = False


class ArduinoHandler(object):
    def __init__(self):
        self.queue = queue.Queue(maxsize=4)
        self.lock = threading.Lock()
        self.thread = None

    def set_camera_tilt(self, value):
        """ Set camera tilt

        TODO: some kind of smoothing.
        """

        def send_message():
            host = 'localhost'

# Path: pyrikura/config.py
# def reload(path):


# Path: pyrikura/uix/utils.py
from ..config import Config as pkConfig
from PIL import Image as PIL_Image
from six.moves import queue
import socket
import threading
import logging

                queue_put(imdata)

        if self.thread is None:
            logger.debug('starting the preview handler')
            self.thread = threading.Thread(target=func)
            self.thread.daemon = True
            self.thread.start()

    def stop(self):
        if self.thread is None:
            logger.debug('want to stop preview thread, but is not running')
        else:
            logger.debug('stopping the preview handler')
            self.running = False


class ArduinoHandler(object):
    def __init__(self):
        self.queue = queue.Queue(maxsize=4)
        self.lock = threading.Lock()
        self.thread = None

    def set_camera_tilt(self, value):
        """ Set camera tilt

        TODO: some kind of smoothing.
        """

        def send_message():
            host = 'localhost'

            port = pkConfig.getint('arduino', 'tcp-port')