write a python daemon

I came across the problem to write a python daemon.
in the end this website helped me solving the problem.

in the daemon-example.py replace the code in the run method with your code.
works like a charm!