Holcombe:Programming
Recent members• Alex Holcombe
|
Projects• Testing Booth Calendar |
|
Technical• Skills Checklist |
Other• Plots,Graphs
|
To understand Dani's programs, there are two steps. First, you must learn Spanish.
Mostly the lab uses PsychoPy (also see mailing list and VisionEgg python libraries to help draw stuff.
Our psychopy and visionegg installation notes .
Python programming
Running python interactively from the Terminal alone is frustrating because you can't use arrow keys for history, no auto-complete, etc. You will probably want to use some IDE.
never have your data file overwritten again! include the following lines in your python code:
from time import localtime,strftime
timeAndDateStr = strftime("%d_%b_%Y_%H:%M", localtime())
filename = 'aBindingExpData_' #include here whatever you want
filename = filename + timeAndDateStr #filename will now have date time and year tacked on the end,
outputFileStream = open(filename, 'a')
#### e.g. 'aBindingExpData_04_Aug_2008_22:46'
Also don't lose track of what program generated the data, take advantage of sys.argv which gives the invoking program name and include code something like:
import sys
print >>logF, 'running script "',sys.argv[0],'"'
Data analysis
programming in R (data analysis)
Python programming for data analysis