import os
from daemon import Daemon
class workDaemon(Daemon):
def run(self):
f = open('some123456.txt', 'w')
f.write('some text')
f.close()
if __name__ == '__main__':
work = workDaemon('/path/to/pid.pid')
work.start()