def replace_file_special_chars(filename_path):
 return filename_path.replace(':', '_')

def replace_file_special_chars ( filename_path ) : return filename_path . replace ( ':' , '_' )
this is a *very* incomplete function which i added to fix a bug: URL and after realizing that it was very hard to perform a replace that worked for all platforms and when the thing to sanitize was a path+filename and not only a filename .