Author: tlinnet
Date: Sat Apr  2 15:59:42 2016
New Revision: 28184

URL: http://svn.gna.org/viewcvs/relax?rev=28184&view=rev
Log:
Adding a verbose True/False for the lib.system.pwd() function.


Modified:
    trunk/lib/system.py

Modified: trunk/lib/system.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/system.py?rev=28184&r1=28183&r2=28184&view=diff
==============================================================================
--- trunk/lib/system.py (original)
+++ trunk/lib/system.py Sat Apr  2 15:59:42 2016
@@ -52,9 +52,11 @@
     print("The current working directory is now changed to: %s"%getcwd())
 
 
-def pwd():
+def pwd(verbose=True):
     """Print and return string of the current working directory.  Equivalent 
of python module os.getcwd(). 
 
+    @keyword verbose:   A flag which if True will cause the current directory 
to be printed.
+    @type verbose:      bool
     @return:            Path to the current working directory.
     @rtype:             str
     """
@@ -63,6 +65,7 @@
     cwd = getcwd()
 
     # Print previous current working directory.
-    print("The current working directory is: %s"%cwd)
+    if verbose:
+        print("The current working directory is: %s"%cwd)
 
     return cwd


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

This is the relax-commits mailing list
relax-commits@gna.org

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