Python3Script Xojo Plugin |

# Python3ScriptConsoleOutput Class (console safe)

A class to capture the output from the Python 3 print methods.

Object
Python3ScriptConsoleOutput

class Python3ScriptConsoleOutput

#### Events

ConsoleOutput | This event is fired when print method is called from within Python script.

#### Examples

Example
Python2Script.Init("TestApp")
Python2Script.SetConsoleOutput(new ConsoleHandler(TextArea1))
Where the ConsoleHandler is subclass of Python2ScriptConsoleOutput
destination As TextArea
Sub Constructor(destination as TextArea)
self.destination = destination
End Sub
Sub ConsoleOutput(output as String)
// This If statement forces the end of line to EndOfLine for correct platform
if output <> EndOfLine then
destination.Text = destination.Text + output
else
destination.Text = destination.Text + EndOfLine
end if
End Sub

#### Supported Platforms:

- macOS Intel 64 bit
- macOS Apple Silicon
- Windows 32 bit
- Windows 64 bit
- Windows ARM 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM 32 bit
- Linux ARM 64 bit