Hi Anadi,
The output for any script can be set through the 'out' property in the
binding:
var script = File.createTempFile('myScript', '.groovy').tap {
write '''
out.println 'hi'
println 6 * 7
printf '%x%n', 6 * 7
out << 'bye'
'''
deleteOnExit()
}
var s
On 13.02.24 08:38, Anadi Kashyap wrote:
Hello Groovy Developers and Community,
Perhaps my last question was missed so I'm asking it again, would
appreciate some direction here -
I am currently working with groovy.util.GroovyScriptEngine and I have
encountered a specific requirement where I need
Hello Groovy Developers and Community,
Perhaps my last question was missed so I'm asking it again, would
appreciate some direction here -
I am currently working with groovy.util.GroovyScriptEngine and I have
encountered a specific requirement where I need to redirect the output of
the script engi
Hello Groovy Developers and Community,
I am currently working with groovy.util.GroovyScriptEngine and I have
encountered a specific requirement where I need to redirect the output of
the script engine to a custom Writer, separate from the default
stdout/stderr, without affecting the rest of the JV