Guest User

Untitled

a guest
May 27th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import datetime
  2. path = '/my/path/to/file.csv'
  3. while 1:
  4. name = input()
  5. date = datetime.datetime.now().strftime('%Y-%m-%d %H-%M-%S)
  6. presence = str(name) + ";" + str(date) + 'n'
  7. print(presence)
  8.  
  9. file = open(path, "a+")
  10. file.write(presence)
  11. file.close()
Add Comment
Please, Sign In to add comment