Your experiment sounds straight-forward and easily programmable in
python. Because of this, I recommend that you use this as motivation
to start to learn the basics of python. While I could whip up a quick
script to give you the answer, I think that you're better off in the
long run putting in the effort, struggling through it, and eventually
learning enough to prevent these types of trial structures from being
an issue again.
The best resource for python is google. Searching for "python
[something with which I'm having trouble]" is the first step for me.
In every single case so far, someone else has had a similar problem
and I've been able to work with their solutions to answer my question.
That being said, here are some places to start:
range(10) : gives you a list of the numbers 0-10
random.choice([item1,item2,...itemN]) : gives you a randomly chosen
item in the list
(remember to type "import random" before calling random)
4 != 5 : python's "not equal" operator.
Lastly, I like to store trial information in lists of dictionaries.
This looks like:
trialList = [{'trial':1, 'spaces':1, 'firstNumber': 2, 'secondNumber':
4,'thirdNumber':1},
{'trial':2, 'spaces':2, 'firstNumber': 4, 'secondNumber': 6,'thirdNumber':7}]
...etc ]
You can add to this by typing:
trialList.append({'trial':3, 'spaces':3, 'firstNumber': 5,
'secondNumber': 1,'thirdNumber':8})
and access each individual variable like this:
for currentTrial in trialList:
print 'number of spaces:',currentTrial['spaces']
print currentTrial['firstNumber'],currentTrial['secondNumber'],currentTrial['thirdNumber']
For which you'll get:
number of spaces: 1
2 4 1
number of spaces: 2
4 6 7
number of spaces: 3
5 1 8
I hope this gives you a good start with your scripting. Good luck!
Emily
> --
> You received this message because you are subscribed to the Google Groups "psychopy-users" group.
> To post to this group, send email to psychop...@googlegroups.com.
> To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.
>
>
An alternative is
print str(" "*spaces).join([digit_1,digit_2,digit_3])
or more likely, just
print str(" "*spaces).join(digits)
-----------------------------------------------------
Gary Lupyan - lup...@wisc.edu
Assistant Professor of Psychology
University of Wisconsin, Madison
http://mywebspace.wisc.edu/lupyan/web/
-----------------------------------------------------