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 Python2ScriptConsoleOutputdestination 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 bitMacOS X Cocoa 64 bitWindows 32 bitWindows 64 bitLinux 32 bitLinux 64 bitLinux ARM