def get_filename_with_new_ext(original_file_path, new_ext, output_directory):
 return path.join(output_directory, (path.splitext(path.split(original_file_path)[1])[0] + new_ext))

def get_filename_with_new_ext ( original_file_path , new_ext , output_directory ) : return path . join ( output_directory , ( path . splitext ( path . split ( original_file_path ) [ 1 ] ) [ 0 ] + new_ext ) )
returns the original file name .