On Wed, 13 Jul 2011 14:14:03 +1000, Daryl Bond wrote:
Hi,
I am trying to log the output from my pyOpenCL kernel to a file.
Using
my standard method of grabbing sys.stdout does not seem to work if I
have printf() statements in my code. The printf() output appears in
the
console output but not in sys.stdout. How should I be going about
grabbing the printf() output from pyOpenCL??
Beware: you're entering the domain of evil hackery.
You could try to dup2() your log file's file descriptor onto standard
output:
http://docs.python.org/library/os.html#os.dup2
HTH,
Andreas
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl