PythonScript Xojo Plugin |

# PythonScriptConsoleOutput Class (console safe)

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

Object
PythonScriptConsoleOutput

class PythonScriptConsoleOutput

#### Events

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

#### Examples

Example
PythonScript.Init("TestApp")
PythonScript.SetConsoleOutput(new ConsoleHandler(TextArea1))
Where the ConsoleHandler is subclass of PythonScriptConsoleOutput
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 X Cocoa 32 bit
- MacOS X Cocoa 64 bit
- Windows 32 bit
- Windows 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM