Josu,

You can capture sys.stdout if you set it a file object you control in Jython itself. Something like the following would work fine:

sys.stdout = cStringIO.StringIO()
# process
function_to_check_result(sys.stdout.getvalue()) # look at it as a string

This capture is a commonly used pattern in the Jython unit tests, so you might want to look at them to get ideas.

- Jim

On Mon, Jan 19, 2009 at 10:27 AM, josu jugo <josu@we.lc.ehu.es> wrote:
Hi

I am running a java application which send information to the standard
output under jython. In the console I can see the information but I
want to process it. I don't know if it is possible to caught the
information in a jython string to manipulate it before.

Any suggestion?

Thanks

josu

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users



--
Jim Baker
jbaker@zyasoft.com