mailr13957 - in /branches/gui_testing: ./ relax.py


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

Header


Content

Posted by edward on July 28, 2011 - 16:28:
Author: bugman
Date: Thu Jul 28 16:28:17 2011
New Revision: 13957

URL: http://svn.gna.org/viewcvs/relax?rev=13957&view=rev
Log:
Merged revisions 13956 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r13956 | bugman | 2011-07-28 16:26:16 +0200 (Thu, 28 Jul 2011) | 3 lines
  
  The relax mode normally specified by the command line can now be overridden.
........

Modified:
    branches/gui_testing/   (props changed)
    branches/gui_testing/relax.py

Propchange: branches/gui_testing/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jul 28 16:28:17 2011
@@ -1,1 +1,1 @@
-/1.3:1-13953
+/1.3:1-13956

Modified: branches/gui_testing/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/relax.py?rev=13957&r1=13956&r2=13957&view=diff
==============================================================================
--- branches/gui_testing/relax.py (original)
+++ branches/gui_testing/relax.py Thu Jul 28 16:28:17 2011
@@ -66,16 +66,18 @@
 putenv('PDBVIEWER', 'vmd')
 
 
-def start(profile_flag=False):
+def start(mode=None, profile_flag=False):
     """Execute relax.
 
+    @keyword mode:          Force a relax mode, overriding the command line.
+    @type mode:             str
     @keyword profile_flag:  Change this flag to True for code profiling.
     @type profile_flag:     bool
     """
 
     # Normal relax operation.
     if not profile_flag:
-        Relax()
+        Relax(mode)
 
     # relax in profiling mode.
     else:
@@ -89,7 +91,7 @@
 
         # Run relax in profiling mode.
         profile.Profile.print_stats = print_stats
-        profile.run('Relax()')
+        profile.run('Relax(mode=%s)' % repr(mode))
 
 
 
@@ -100,8 +102,12 @@
     whether debugging is turned on, etc.
     """
 
-    def __init__(self):
-        """The top level class for initialising the program."""
+    def __init__(self, mode=None):
+        """The top level class for initialising the program.
+
+        @keyword mode:          Force a relax mode, overriding the command 
line.
+        @type mode:             str
+        """
 
         # Get and store the PID of this process.
         self.pid = getpid()
@@ -110,7 +116,8 @@
         self.generic = generic_fns
 
         # Process the command line arguments and determine the relax mode.
-        mode, log_file, tee_file = self.arguments()
+        if not mode:
+            mode, log_file, tee_file = self.arguments()
 
         # Set up the warning system.
         relax_warnings.setup(self.pedantic)




Related Messages


Powered by MHonArc, Updated Thu Jul 28 16:40:02 2011