mailr14089 - in /branches/gui_testing/gui: analyses/auto_model_free.py analyses/auto_noe.py analyses/auto_rx_base.py controller.py


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

Header


Content

Posted by edward on August 03, 2011 - 18:27:
Author: bugman
Date: Wed Aug  3 18:27:58 2011
New Revision: 14089

URL: http://svn.gna.org/viewcvs/relax?rev=14089&view=rev
Log:
The relax controller and auto-analysis threads are now active in debugging 
mode.

The Redirect_text.write() method now sends the text to sys.__stdout__.write() 
prior to any other
actions so that all debugging messages are sent minimally to the terminal.  
This allows debugging
of the GUI and threads with them being active.


Modified:
    branches/gui_testing/gui/analyses/auto_model_free.py
    branches/gui_testing/gui/analyses/auto_noe.py
    branches/gui_testing/gui/analyses/auto_rx_base.py
    branches/gui_testing/gui/controller.py

Modified: branches/gui_testing/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_model_free.py?rev=14089&r1=14088&r2=14089&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/auto_model_free.py (original)
+++ branches/gui_testing/gui/analyses/auto_model_free.py Wed Aug  3 18:27:58 
2011
@@ -534,17 +534,12 @@
         else:
             data.global_models = [mode]
 
-        # Display the relax controller (if not debugging).
-        if not status.debug and status.show_gui:
+        # Display the relax controller.
+        if status.show_gui:
             self.gui.controller.Show()
 
-        # Threading flag.
-        thread = True
-        if status.debug:
-            thread = False
-
         # Start the thread.
-        self.thread = Execute_mf(self.gui, data, self.data_index, 
thread=thread)
+        self.thread = Execute_mf(self.gui, data, self.data_index)
         self.thread.start()
 
         # Terminate the event.

Modified: branches/gui_testing/gui/analyses/auto_noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_noe.py?rev=14089&r1=14088&r2=14089&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/auto_noe.py (original)
+++ branches/gui_testing/gui/analyses/auto_noe.py Wed Aug  3 18:27:58 2011
@@ -233,17 +233,12 @@
             Missing_data(missing)
             return
 
-        # Display the relax controller (if not debugging).
-        if not status.debug and status.show_gui:
+        # Display the relax controller.
+        if status.show_gui:
             self.gui.controller.Show()
 
-        # Threading flag.
-        thread = True
-        if status.debug:
-            thread = False
-
         # Start the thread.
-        self.thread = Execute_noe(self.gui, data, self.data_index, 
thread=thread)
+        self.thread = Execute_noe(self.gui, data, self.data_index)
         self.thread.start()
 
         # Terminate the event.

Modified: branches/gui_testing/gui/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_rx_base.py?rev=14089&r1=14088&r2=14089&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/auto_rx_base.py (original)
+++ branches/gui_testing/gui/analyses/auto_rx_base.py Wed Aug  3 18:27:58 2011
@@ -247,17 +247,12 @@
             Missing_data(missing)
             return
 
-        # Display the relax controller (if not debugging).
-        if not status.debug and status.show_gui:
+        # Display the relax controller.
+        if status.show_gui:
             self.gui.controller.Show()
 
-        # Threading flag.
-        thread = True
-        if status.debug:
-            thread = False
-
         # Start the thread.
-        self.thread = Execute_rx(self.gui, data, self.data_index, 
thread=thread)
+        self.thread = Execute_rx(self.gui, data, self.data_index)
         self.thread.start()
 
         # Terminate the event.

Modified: branches/gui_testing/gui/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/controller.py?rev=14089&r1=14088&r2=14089&view=diff
==============================================================================
--- branches/gui_testing/gui/controller.py (original)
+++ branches/gui_testing/gui/controller.py Wed Aug  3 18:27:58 2011
@@ -95,10 +95,9 @@
         sizer.Add(self.log_panel, 1, wx.EXPAND|wx.ALL, 0)
 
         # IO redirection.
-        if not status.debug and not status.test_mode:
-            redir = Redirect_text(self.log_panel, self.log_queue)
-            sys.stdout = redir
-            sys.stderr = redir
+        redir = Redirect_text(self.log_panel, self.log_queue)
+        sys.stdout = redir
+        sys.stderr = redir
 
         # Initial update of the controller.
         self.update_controller()
@@ -619,9 +618,12 @@
         @type string:   str
         """
 
+        # Debugging.
+        if status.debug:
+            sys.__stdout__.write(string)
+
         # Add the text to the queue.
         self.log_queue.put(string)
 
         # Call the log control write method one the GUI is responsive.
-        sys.__stdout__.write(string)
         wx.CallAfter(self.control.write)




Related Messages


Powered by MHonArc, Updated Wed Aug 03 18:40:02 2011