how to create daemon via python

how to create daemon via python