from psychopy import gui
#create a dictionary of information
info = {'Observer':'jwp', 'GratingOri':45, 'ExpVersion': 1.1}
#create and display the dialogue based on info
infoDlg = gui.DlgFromDict(dictionary=info,
title='TestExperiment',
fixed=['ExpVersion'])#can include list of fields that user can't edit
#did the user press ok?
if infoDlg.OK:
print info
else:
print 'User Cancelled'
#add some info to your dictionary
info['somethingSecret'] = "boo!"