FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 17d05946 authored by Rob Thompson's avatar Rob Thompson
Browse files

add a location to the swipe log

parent 1a554afb
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ import time
import os
log_file_name = '/home/msm-class/attendance_log.csv'
location = "lab" #alter for other locations, e.g. lecture room
# Set up the GUI
# Define the window's contents
......@@ -81,7 +83,7 @@ while True:
# record the ID and the time to a file
with open(log_file_name,'at') as f:
f.write(identity + ',' + time.ctime() + '\n')
f.write(identity + ',' + time.ctime() + ',' + location + '\n')
# Finish up by removing from the screen
window.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment