code: def replace_suffix (name, new_suffix):
      
      assert isinstance(name, basestring)
      assert isinstance(new_suffix, basestring)
      split = os.path.splitext (name)
      return split [0] + new_suffix
docs: Replaces the suffix of name by new_suffix.
          If no suffix exists, the new one is added.