0

Hi

Ive recently tried to move a python code from a mac version to a version of Psychopy IDE. Now the code wont work on the pc it tells me there a syntax error. Is there something different that mac uses in the python code then the pc? if not any other suggestions why it wouldnt be working

IVe included the code, sadly i didnt write this and no almost nothing about programming

```
from psychopy import visual, core, misc, event
import numpy #for maths on arrays
from numpy.random import random, shuffle #we only need these two commands from this lib
from random import *
import math
win = visual.Window([1024,768], units='pix', monitor='testMonitor',rgb=(-1,-1,-1))
numbers = range(100) #range of stimuli to be generated or how many to generate
#Choose N, elementsize and filenames
for x in numbers:
N=85 #number to generate0
#To choose which stimuli to generate uncomment the appropriate line
#Contour length
#elemSize = 2000/((N)*math.pi*2)#contour lentgth
#elemSize = 2000/((50)*math.pi*2)#50CLcontrol
#Brightness controls
# elemSize=math.sqrt(70000/((N)*math.pi))#brightness
elemSize=math.sqrt(70000/((50)*math.pi))#50BRcontrol
#create empty list of locations
locations=[]
i=1
while i<=N :
locations.append([randrange(int(elemSize)-512,512-int(elemSize)),randrange(int(elemSize)-389,389-int(elemSize))])
i=i+1
#build an array of circles according to the parameters
globForm = visual.ElementArrayStim(win, nElements=N, units='pix',sizes=elemSize,fieldShape='sqr',fieldSize=(1024-elemSize,768-elemSize),sfs=0,elementMask='circle',xys=locations)
globForm.draw()
win.flip(clearBuffer=False)#redraw the buffer
win.getMovieFrame()
win.flip(clearBuffer=True)
#adjustfilename as appropriate
win.saveMovieFrames('B085.jpg')
core.quit()
event.clearEvents()#keep the event buffer from overflowing
```