Hello
I want to redirect output of jython's functions print and println to JTextArea component. Is it possible ?
I tried this (swingConsole.textArea is instance):
In my class
self.printStream= MyPrintStream(System.out) System.setOut(self.printStream)
---------------------------------------------------- class MyPrintStream (PrintStream):
def println (str): swingConsole.textArea.append(str)
def print (str): swingConsole.textArea.append(str)
Output is still directed to standard output.
Thanks for help, Jan -- http://mail.python.org/mailman/listinfo/python-list