I'm trying to create a daemon with Python's daemon library. The code works fine on my desktop machine (Mac OS X), it writes a file in the /tmp directory. On my Pi however it doesn't create a file. Needless to say, I have tried to change the directory to "/home/pi/Templates" and also create a 'tmp' directory in the root directory, with no success. What am I doing wrong?
Code: Select all
with open("/tmp/current_time.txt", "w") as f:
f.write("The time is now " + time.ctime())
if __name__ == "__main__":