Tutorials Check In System

Code: https://github.com/taylor-peterson/shop-check-in

Gspread: Have to go to https://myaccount.google.com and allow access for less secure apps.

For some reason, need to check the spreadsheet in another thread or the card reader stops working.

  1. Key logging derived from
  2. http://antihackingtutorials.blogspot.com/2012/06/in-this-tutorial-we-will-show-you-how.html

gspread Source: https://github.com/burnash/gspread
gspread API: https://burnash.github.io/gspread/
Threading: http://pymotw.com/2/threading/
FSM reference: http://www.python-course.eu/finite_state_machine.php
Better threading reference: http://eli.thegreenplace.net/2011/12/27/python-threads-communication-and-stopping
- Threading is appropriate for this application as the work being done is not CPU intensive.
Yield keyword: https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do-in-python (second answer clearest)
Daemon Threads: https://stackoverflow.com/questions/190010/daemon-threads-explanation

Remember github password - git config —global credential.helper wincred

# Need to use daemon threads?
# need to joing non-keylogging threads?
# have proctor safety test update the proctorness column

Python exceptions: http://www.jeffknupp.com/blog/2013/02/06/write-cleaner-python-use-exceptions/
The gist: python philosophy espouses the (Easier to Ask Forgiveness than Permission) style. So instead of using lots of if statements, handle errors like the below.

def example_function():
# try your thing that might fail
except SomeError:
# handle the error appropriately
except SomeOtherError:
# handle error appropriately
# do what you want to do
raise # catching all exceptions is dangerous, so let the exception propagate normally
# do the things you want to do assuming no failure
# cleanup - runs whether or not an exception occured

.gitignore: https://github.com/github/gitignore/blob/master/Python.gitignore

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License