def get_leafname(self, path): """Get the leafname of the specified file.""" pos = string.rfind(path, os.sep) if pos != -1: return path[pos+1:] else: return path