Author: tlinnet
Date: Sat Apr  2 14:12:25 2016
New Revision: 28179

URL: http://svn.gna.org/viewcvs/relax?rev=28179&view=rev
Log:
Adding a new lib.system,.pwd() function, to print and return the current 
working directory.

Modified:
    trunk/lib/system.py

Modified: trunk/lib/system.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/system.py?rev=28179&r1=28178&r2=28179&view=diff
==============================================================================
--- trunk/lib/system.py (original)
+++ trunk/lib/system.py Sat Apr  2 14:12:25 2016
@@ -50,3 +50,19 @@
 
     # Print current working directory.
     print("The current working directory is now changed to: %s"%getcwd())
+
+
+def pwd():
+    """Print and return string of the current working directory.  Equivalent 
of python module os.getcwd(). 
+
+    @return:            Path to the current working directory.
+    @rtype:             str
+    """
+
+    # Get the current working directory.
+    cwd = getcwd()
+
+    # Print previous current working directory.
+    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