Skip to content

Instantly share code, notes, and snippets.

View flipphillips's full-sized avatar

Flip Phillips flipphillips

View GitHub Profile
@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