mailr11719 - /branches/bieri_gui/gui_bieri/controller.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 07, 2010 - 01:06:
Author: bugman
Date: Tue Dec  7 01:06:54 2010
New Revision: 11719

URL: http://svn.gna.org/viewcvs/relax?rev=11719&view=rev
Log:
All IO is now being redirected to the relax controller.

This allows user function print outs to be visible, as well as all error and 
warning messages.


Modified:
    branches/bieri_gui/gui_bieri/controller.py

Modified: branches/bieri_gui/gui_bieri/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/controller.py?rev=11719&r1=11718&r2=11719&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/controller.py (original)
+++ branches/bieri_gui/gui_bieri/controller.py Tue Dec  7 01:06:54 2010
@@ -25,6 +25,7 @@
 """Log window of relax GUI controlling all calculations."""
 
 # Python module imports.
+import __main__
 from os import sep
 from string import split, replace
 import sys
@@ -56,6 +57,12 @@
         self.size_x = 600
         self.size_y = 600
         self.border = 5
+
+        # IO redirection.
+        if not __main__.debug:
+            redir = Redirect_text(self)
+            sys.stdout = redir
+            sys.stderr = redir
 
         # Set up the frame.
         sizer = self.setup_frame()




Related Messages


Powered by MHonArc, Updated Tue Dec 07 11:20:01 2010