Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- path = '/my/path/to/file.csv'
- while 1:
- name = input()
- date = datetime.datetime.now().strftime('%Y-%m-%d %H-%M-%S)
- presence = str(name) + ";" + str(date) + 'n'
- print(presence)
- file = open(path, "a+")
- file.write(presence)
- file.close()
Add Comment
Please, Sign In to add comment