PythonScript Xojo Plugin |

# PythonModule.GetFunction Method (console safe)

Gets a function by name from to execute from the class module.

GetFunction(
name as String) as PythonFunction

#### Parameters

name
  Name of the function to get.

#### Returns

PythonFunction
  PythonFunction or nil if function was not found.

#### Remarks

func = package.GetFunction("TestFunction")
if func <> nil then
result = func.Invoke(nil)
if result <> nil then
else
if PythonScript.ErrorOccurred then
MsgBox PythonScript.GetError()
PythonScript.ClearError()
end if
end if
end if

#### See Also

PythonModule Class