nested_grid_plotter.replace_bad_path_characters#

nested_grid_plotter.replace_bad_path_characters(filename: str, repchar: str = '_') str[source]#

Make filename compatible with path by replacement.

Replace anything that isn’t alphanumeric, -, _, a space, or a period. Note that leading and trailing white spaces and replacement characters are also removed.

Parameters:
  • filename (str) – Old filename.

  • repchar (str, optional) – The string to replace the bad values with. The default is “_”.

Returns:

New filename.

Return type:

str