def compileScenic(code, removeIndentation=True): if removeIndentation: # to allow indenting code to line up with test function code = inspect.cleandoc(code) checkVeneerIsInactive() scenario = scenarioFromString(code) checkVeneerIsInactive() return scenario
def fromScenicCode(cls, code, maxIterations=None, ignoredProperties=None): """As above, but given a Scenic program as a string.""" scenario = scenic.scenarioFromString(code) return cls(scenario, maxIterations=maxIterations, ignoredProperties=ignoredProperties)