Author: bugman Date: Mon Apr 7 18:25:39 2008 New Revision: 5382 URL: http://svn.gna.org/viewcvs/relax?rev=5382&view=rev Log: Converted file_root() from a class method to a module function, and updated it to the new design. Modified: 1.3/relax_io.py Modified: 1.3/relax_io.py URL: http://svn.gna.org/viewcvs/relax/1.3/relax_io.py?rev=5382&r1=5381&r2=5382&view=diff ============================================================================== --- 1.3/relax_io.py (original) +++ 1.3/relax_io.py Mon Apr 7 18:25:39 2008 @@ -139,6 +139,19 @@ file.close() +def file_root(file_path): + """Return the root file name, striped of path and extension details. + + @param file_path: The full path to the file. + @type file_path: str + @return: The file root (with all directories and the extension stripped away). + @rtype: str + """ + + root,ext = splitext(file_path) + return basename(root) + + def get_file_path(file_name=None, dir=None): """Generate and expand the full file path. @@ -493,13 +506,6 @@ remove(file_path) - def file_root(self, file_path): - """Return the root file name, striped of path and extension details""" - - root,ext = splitext(file_path) - return basename(root) - - def logging_off(self, file_name=None, dir=None, verbosity=1): """Function for turning logging and teeing off."""