MatthewASimonson / r-orange

Automatically exported from code.google.com/p/r-orange
Other
0 stars 0 forks source link

rpy2 sys.stdout #483

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
def consoleFlush():
    sys.stdout.flush()

the flush function needs to exist in the logHandler class of redRLogs.

Plus this may be a way to capture all the R output. 

Original issue reported on code.google.com by anup.parikh on 7 Feb 2011 at 5:29

GoogleCodeExporter commented 9 years ago
these changes seem to be rpy 2.1.9 specific, which we dont have on windows...

Original comment by anup.parikh on 8 Feb 2011 at 3:48

GoogleCodeExporter commented 9 years ago
setting sys.stdout crashes on 64bit linux

setting an os specific catch.

Original comment by kylecovi...@gmail.com on 9 Feb 2011 at 7:29

GoogleCodeExporter commented 9 years ago
is this a bug in python? or a bug in our code?

Original comment by anup.parikh on 9 Feb 2011 at 8:25

GoogleCodeExporter commented 9 years ago
seems to happen right away and just shut down red-r

happens in the three lines that are after the comment for sys.platform win32

best just not to use it.  print statements should be routed through redRLog 
anyway

clearing the issue and we'll just have to live with loss of print in output 
using linux

Original comment by kylecovi...@gmail.com on 9 Feb 2011 at 8:32

GoogleCodeExporter commented 9 years ago
without the sys.stdout = self line the print statement will be not handled
by redRLog. they will just be printed to stdout.
so i think fixing the error would be better.

Original comment by anup.parikh on 9 Feb 2011 at 9:30