mailr17962 - in /branches/cst: ./ generic_fns/pipes.py


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

Header


Content

Posted by edward on November 14, 2012 - 10:23:
Author: bugman
Date: Wed Nov 14 10:23:36 2012
New Revision: 17962

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

........
  r17960 | bugman | 2012-11-14 10:20:30 +0100 (Wed, 14 Nov 2012) | 3 lines
  
  The pipe.display user function now uses relax_io.write_data() for better 
output formatting.
........

Modified:
    branches/cst/   (props changed)
    branches/cst/generic_fns/pipes.py

Propchange: branches/cst/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov 14 10:23:36 2012
@@ -1,1 +1,1 @@
-/trunk:1-17945
+/trunk:1-17961

Modified: branches/cst/generic_fns/pipes.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/cst/generic_fns/pipes.py?rev=17962&r1=17961&r2=17962&view=diff
==============================================================================
--- branches/cst/generic_fns/pipes.py (original)
+++ branches/cst/generic_fns/pipes.py Wed Nov 14 10:23:36 2012
@@ -34,6 +34,7 @@
 from data import Relax_data_store; ds = Relax_data_store()
 from dep_check import C_module_exp_fn, scipy_module
 from relax_errors import RelaxError, RelaxNoPipeError, RelaxPipeError
+from relax_io import write_data
 from status import Status; status = Status()
 
 
@@ -256,22 +257,23 @@
     # Acquire the pipe lock, and make sure it is finally released.
     status.pipe_lock.acquire(sys._getframe().f_code.co_name)
     try:
-        # Heading.
-        print("%-20s%-20s%-20s%-20s" % ("Data pipe name", "Data pipe type", 
"Bundle", "Current"))
-
         # Loop over the data pipes.
+        data = []
         for pipe_name in ds:
             # The current data pipe.
             current = ''
             if pipe_name == cdp_name():
                 current = '*'
 
-            # Print out.
-            print("%-20s%-20s%-20s%-20s" % (repr(pipe_name), 
get_type(pipe_name), repr(get_bundle(pipe_name)), current))
+            # Store the data for the print out.
+            data.append([repr(pipe_name), get_type(pipe_name), 
repr(get_bundle(pipe_name)), current])
 
     # Release the lock.
     finally:
         status.pipe_lock.release(sys._getframe().f_code.co_name)
+
+    # Print out.
+    write_data(out=sys.stdout, headings=["Data pipe name", "Data pipe type", 
"Bundle", "Current"], data=data)
 
 
 def get_bundle(pipe=None):




Related Messages


Powered by MHonArc, Updated Wed Nov 14 11:00:01 2012