mailRe: r26943 - /branches/nmrglue/pipe_control/io.py


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

Header


Content

Posted by Edward d'Auvergne on December 03, 2014 - 21:58:
Hi Troels,

Please try to be careful with what code changes, or to mention it all
in the message.  This is mainly print statements, as the message says,
but you also introduce the check_pipe() call.

Cheers,

Edward



On 3 December 2014 at 20:40,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Wed Dec  3 20:40:57 2014
New Revision: 26943

URL: http://svn.gna.org/viewcvs/relax?rev=26943&view=rev
Log:
Expanding the pipe_control.io.file_list() function to print out info.

Task #7873 (https://gna.org/task/index.php?7873): Write wrapper function to 
nmrglue, to read .ft2 files and process them.
Homepage: http://www.nmrglue.com/
Link to nmrglue discussion: 
https://groups.google.com/forum/#!forum/nmrglue-discuss
The code is develop at Github: https://github.com/jjhelmus/nmrglue/
Documentation: http://nmrglue.readthedocs.org/en/latest/index.html

Modified:
    branches/nmrglue/pipe_control/io.py

Modified: branches/nmrglue/pipe_control/io.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nmrglue/pipe_control/io.py?rev=26943&r1=26942&r2=26943&view=diff
==============================================================================
--- branches/nmrglue/pipe_control/io.py (original)
+++ branches/nmrglue/pipe_control/io.py Wed Dec  3 20:40:57 2014
@@ -22,9 +22,13 @@
 # Module docstring.
 """Module for the using of pipe_control.io."""

+# Python module imports.
+import sys
+
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import get_file_list
+from lib.text.sectioning import section
 from pipe_control.pipes import check_pipe


@@ -79,6 +83,9 @@
     @type id:               None or str
     """

+    # Data checks.
+    check_pipe()
+
     # Get the file list.
     basename_list, file_root_list = get_file_list(glob_pattern=glob, 
dir=dir)

@@ -88,8 +95,18 @@

     # Add the io_id to the data store.
     add_io_id(io_id=id)
+    # Printout.
+    section(file=sys.stdout, text="File list for ID='%s'"%(id), prespace=2)

-    # Store in cdp.
+    # Store in cdp and print info.
+    add_io_data(object_name='io_glob', io_id=id, io_data=glob)
+    print('cdp.io_glob["%s"] = "%s"'%(id, cdp.io_glob[id]))
+
     add_io_data(object_name='io_basename', io_id=id, io_data=basename_list)
+    print('cdp.io_basename["%s"] = %s'%(id, cdp.io_basename[id]))
+
     add_io_data(object_name='io_file_root', io_id=id, 
io_data=file_root_list)
+    print('cdp.io_file_root["%s"] = %s'%(id, cdp.io_file_root[id]))
+
     add_io_data(object_name='io_dir', io_id=id, io_data=dir)
+    print('cdp.io_dir["%s"] = "%s"'%(id, cdp.io_dir[id]))


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

This is the relax-commits mailing list
relax-commits@xxxxxxx

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



Related Messages


Powered by MHonArc, Updated Wed Dec 03 22:40:08 2014