def addTurtleParams( self, who, color, heading, xcor, ycor, shape, label, labelColor, breed, isHidden, size, penSize, penMode, additionalParams, columnTypes, ): rex_string = re.compile(r"\"(.*)\"") turtle = Turtle() turtle.who = int(who) turtle.color = float(color) turtle.heading = heading turtle.xcor = float(xcor) turtle.ycor = float(ycor) turtle.additionalParams = additionalParams turtle.columnTypes = columnTypes match = rex_string.search(shape) if match != None: turtle.shape = match.group(1) else: turtle.shape = shape match = rex_string.search(label) if match != None: turtle.label = match.group(1) else: turtle.label = label turtle.labelColor = float(labelColor) turtle.breed = breed turtle.isHidden = isHidden == "true" turtle.size = float(size) turtle.penSize = float(penSize) match = rex_string.search(penMode) if match != None: turtle.penMode = match.group(1) else: turtle.penMode = penMode self.addTurtle(turtle) return turtle