mailr10423 - /branches/bieri_gui/gui_bieri/execution/calc_modelfree.py


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

Header


Content

Posted by edward on January 27, 2010 - 10:35:
Author: bugman
Date: Wed Jan 27 10:35:00 2010
New Revision: 10423

URL: http://svn.gna.org/viewcvs/relax?rev=10423&view=rev
Log:
Manually applied the redirect_patch file.

This was attached to https://gna.org/task/?6847 by Michael Bieri
(https://gna.org/users/michaelbieri), in the zip file 
calc_modelfree.py_patch.tar.gz
(https://gna.org/support/download.php?file_id=7750).

The new class has been copied and pasted to the bottom of the module, and the 
comment above the
class was converted into a class docstring.


Modified:
    branches/bieri_gui/gui_bieri/execution/calc_modelfree.py

Modified: branches/bieri_gui/gui_bieri/execution/calc_modelfree.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/execution/calc_modelfree.py?rev=10423&r1=10422&r2=10423&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/execution/calc_modelfree.py (original)
+++ branches/bieri_gui/gui_bieri/execution/calc_modelfree.py Wed Jan 27 
10:35:00 2010
@@ -253,3 +253,30 @@
             relax_run_ok('Ellipsoid calculation was successful !')
         if model == 'Final':
             relax_run_ok('Final Model-free calculation was successful !')
+
+
+
+class RedirectText(object):
+    """Class to redirect relax output to relaxGUI - log panel and progress 
bar."""
+
+    def __init__(self,aWxTextCtrl):
+        self.out=aWxTextCtrl
+ 
+    def write(self,string):
+        global progress
+
+        wx.CallAfter(self.out.log_panel.WriteText, string)
+        time.sleep(0.001)  # allow relaxGUI log panel to get refreshed
+
+        # split print out into list
+        a = str(string)
+        check = []
+        check = a.split()
+        
+        # update progress bar
+        if 'Simulation' in string:          
+            add = round(progress)
+            add_int = int(add)
+            wx.CallAfter(self.out.progress_bar.SetValue, add_int)
+            progress = ( (int(check[1]) * 100) / float(montecarlo + 6)) + 5
+            time.sleep(0.001)  # allow relaxGUI progressbar to get refreshed




Related Messages


Powered by MHonArc, Updated Wed Jan 27 10:40:04 2010