3.2. SofaRuntime

Control of the application runtime

Example

import SofaRuntime
SofaRuntime.importPlugin("Sofa.Component.LinearSolver")

3.2.1. API Table of Content

importPlugin(a)

Import a plugin

unloadModules()

Call this function to unload python modules and to force their reload

formatStackForSofa(o)

Format the stack trace provided as parameter

getStackForSofa()

Returns the current stack with a "informal" formatting

getPythonCallingPointAsString()

Returns the last entry with an "informal" formatting

getPythonCallingPoint()

Returns the tupe with closest filename and line

sendMessageFromException(e)

Function handling exception using sofaExceptHandler() (SOFA format)

sofaFormatHandler(type, value, tb)

This exception handler forwards python exceptions & traceback

sofaExceptHandler(type, value, tb)

This exception handler converts python exceptions & traceback into classical SOFA error messages

getSofaFormattedStringFromException(e)

Function handling exception using sofaFormatHandler() (python stack)