Skip to content

Instantly share code, notes, and snippets.

View flipphillips's full-sized avatar

Flip Phillips flipphillips

View GitHub Profile

Keybase proof

I hereby claim:

  • I am flipphillips on github.
  • I am flipphillips (https://keybase.io/flipphillips) on keybase.
  • I have a public key whose fingerprint is 9DCC 89AD E520 C857 DD6A 46CC 9473 6856 24EE 271D

To claim this, I am signing this object:

@flipphillips
flipphillips / ppinfo.py
Created December 14, 2012 00:13
PsychoPy: ask for info
# get subject information
expInfo = {u'session': u'001', u'subject': u''}
dlg = gui.DlgFromDict(dictionary=expInfo, title='Sweep Acuity')
if dlg.OK == False:
core.quit() # user pressed cancel
expInfo['date'] = data.getDateStr() # add a simple timestamp
# Setup files for saving
if not os.path.isdir('data'):
os.makedirs('data') # if this fails (e.g. permissions) we will get error