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 PythonScriptConsoleOutputdestination 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