Author: tlinnet Date: Sat Apr 2 17:05:45 2016 New Revision: 28187 URL: http://svn.gna.org/viewcvs/relax?rev=28187&view=rev Log: Adding af verbose flag to 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=28187&r1=28186&r2=28187&view=diff ============================================================================== --- trunk/lib/system.py (original) +++ trunk/lib/system.py Sat Apr 2 17:05:45 2016 @@ -29,9 +29,11 @@ import lib.arg_check -def cd(path): +def cd(path, verbose=False): """The equivalent of python module os.chdir(path). Change the current working directory to the specified path. + @keyword verbose: A flag which if True will cause the previous directory to be printed. + @type verbose: bool @param path: The path to the directory for the current working directory. @type path: str """ @@ -43,7 +45,8 @@ path = path.replace('"', '').replace("'", "") # Print previous current working directory. - print("The current working directory was: %s"%getcwd()) + if verbose: + print("The current working directory was: %s"%getcwd()) # Change the current working directory. chdir(path) _______________________________________________ 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