I used moving moving-window SPR paradigm.
and I have five loops, each assigned to a separate CSV file.
In Desktop mode, the CSV files load correctly, but as soon as I switch to browser mode, it seems like the CSV files aren’t loading.
The PsychoPy files are placed in the main Git folder, and the CSV files are in the resources folder within the Git directory.
So Loop condition is resources/exercise.csv
Begin Routine
sentenceList = expsentence.split()
wordNumber = -1
timeOfLastResponse = 0
def replaceWithdash(textList, currentWordNumber):
dashSentence = ''
for index, word in enumerate(textList): # cycle through the words and their index numbers
if index != currentWordNumber:
dashSentence = dashSentence + '--' * len(word) + '--' # add two strings of dash characters
elif wordNumber==5:
dashSentence = ' ' + dashSentence + word + '.'# the last word will appear with a period
else:
dashSentence = ' ' + dashSentence + word + ' ' # except for the current word
return dashSentence # yields the manipulated sentence
exp_sprText.text = replaceWithdash(sentenceList, wordNumber)
Each Frame
keypresses = event.getKeys()
if ‘space’ in keypresses:
wordNumber += 1
if wordNumber >= len(sentenceList):
continueRoutine = False
else:
exp_sprText.text = replaceWithdash(sentenceList, wordNumber)
I want to know that python code works but if I change code type like Auto->JV, it said, it said /* Syntax Error: Fix Python code */ so is it problem of my situation?
Tnx