Author: bugman
Date: Mon Apr  2 17:36:05 2012
New Revision: 15650

URL: http://svn.gna.org/viewcvs/relax?rev=15650&view=rev
Log:
Fix for IO redirection with the print_frame_order_2nd_degree() function.

This now no longer prints to the start up sys.stdout file handle, but to 
current value at execution.


Modified:
    branches/frame_order_testing/generic_fns/frame_order.py

Modified: branches/frame_order_testing/generic_fns/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/frame_order.py?rev=15650&r1=15649&r2=15650&view=diff
==============================================================================
--- branches/frame_order_testing/generic_fns/frame_order.py (original)
+++ branches/frame_order_testing/generic_fns/frame_order.py Mon Apr  2 17:36:05 
2012
@@ -31,7 +31,7 @@
 from float import isNaN
 
 
-def print_frame_order_2nd_degree(daeg, name=None, epsilon=1e-15, 
integer=False, dot=False, comma=True, file=sys.stdout):
+def print_frame_order_2nd_degree(daeg, name=None, epsilon=1e-15, 
integer=False, dot=False, comma=True, file=None):
     """Nicely print out the Frame Order matrix of the 2nd degree.
 
     @param daeg:        The 3D, rank-4 Frame Order matrix.
@@ -53,6 +53,10 @@
     # Default name.
     if not name:
         name = 'Frame Order matrix, 2nd degree'
+
+    # No file given, so send to STDOUT.
+    if file == None:
+        file = sys.stdout
 
     # Header and first row start.
     file.write("\n%s:\n" % name)


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to