PythonScript Xojo Plugin

PythonResult Class (console safe)

A class that represents a result from a function call in Python.

Object
   PythonResult

class PythonResult

Constructors

PythonResultConstructs a empty PythonResult
PythonResultConstructs a result with Int32 value
PythonResultConstructs a result with Int64 value
PythonResultConstructs a result with UInt64 value
PythonResultConstructs a result with double value
PythonResultConstructs a result with string value
PythonResultConstructs a result with boolean value
PythonResultConstructs a result with object value

Methods

BooleanValue (console safe) Returns boolean value from the result
DictionaryValue (console safe) Returns the internal Dictionary value as a PythonDictionary instance. This is used to read keyed multiple results.
DoubleValue (console safe) Returns double value from the result
GetPtr (console safe) Gets a pointer to the inner Python object of the PythonResult class.
Int64Value (console safe) Returns Int64 value from the result
IntegerValue (console safe) Returns integer value from the result
IsBigInteger (console safe) Returns true if the Result is big integer of any kind.
IsBoolean (console safe) Returns true if the Result is Boolean
IsDictionary (console safe) Returns true if the result is a Dictionary
IsDouble (console safe) Returns true if the Result is Double
IsInteger (console safe) Returns true if the Result is Integer
IsObject (console safe) Returns true if the Result is Xojo or Real Studio object
IsString (console safe) Returns true if the Result is String
IsTuple (console safe) Returns true if the result is a Tuple
ObjectValue (console safe) Returns a object field from the result. Object field here means that Xojo or Real Studio object gets stored in a Python script
StringValue (console safe) Returns string value from the result
TupleValue (console safe) Returns the internal tuple value as a PythonParameters instance. This is used to read multiple results.
UInt64Value (console safe) Returns UInt64 value from the result

Examples

You can get instance of this class from the Invoke functions.

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

Supported Platforms:

  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM