mailr3165 - in /1.3: generic_fns/pipes.py prompt/pipe.py


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

Header


Content

Posted by edward on March 13, 2007 - 04:45:
Author: bugman
Date: Tue Mar 13 04:45:17 2007
New Revision: 3165

URL: http://svn.gna.org/viewcvs/relax?rev=3165&view=rev
Log:
Created the new pipe.current() user function.

Modified:
    1.3/generic_fns/pipes.py
    1.3/prompt/pipe.py

Modified: 1.3/generic_fns/pipes.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pipes.py?rev=3165&r1=3164&r2=3165&view=diff
==============================================================================
--- 1.3/generic_fns/pipes.py (original)
+++ 1.3/generic_fns/pipes.py Tue Mar 13 04:45:17 2007
@@ -76,6 +76,12 @@
     relax_data_store.current_pipe = pipe_name
 
 
+def current():
+    """Print the name of the current data pipe."""
+
+    print relax_data_store.current_pipe
+
+
 def delete(pipe_name=None):
     """Delete a data pipe.
 

Modified: 1.3/prompt/pipe.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/pipe.py?rev=3165&r1=3164&r2=3165&view=diff
==============================================================================
--- 1.3/prompt/pipe.py (original)
+++ 1.3/prompt/pipe.py Tue Mar 13 04:45:17 2007
@@ -93,6 +93,26 @@
         pipes.create(pipe_name=pipe_name, pipe_type=pipe_type)
 
 
+    def current(self):
+        """Print the name of the current pipe.
+
+        Examples
+        ~~~~~~~~
+
+        To run the user function, type:
+
+        relax> pipe.current()
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "pipe.current()"
+            print text
+
+        # Execute the functional code.
+        pipes.current()
+
+
     def delete(self, pipe_name=None):
         """Function for deleting a data pipe.
 




Related Messages


Powered by MHonArc, Updated Tue Mar 13 05:00:08 2007