pyvale.common.util module

print_pyvale_banner()[source]
print_title(title)[source]
info(msg)[source]
info_out(label, value)[source]
check_output_directory(output_basepath, output_prefix, print_level)[source]

Check for existing output files in a directory and prompt user confirmation before overwriting.

This function verifies whether the specified output directory exists and checks for any existing files that match a given prefix and have .csv or .dic2d extensions. If such files are found, a list is displayed and the user is prompted to confirm whether to continue. If the user declines, the program exits to prevent data loss.

Parameters:
  • output_basepath (str) – Path to the output directory where files are or will be saved.

  • output_prefix (str) – Filename prefix used to identify potential conflicting output files.

  • print_level (int) – Determines how much information to provide in console output.

Raises:

SystemExit – If the output directory does not exist or the user chooses not to proceed after being warned about existing files.

natural_sort_key(value)[source]

Key that sorts decimal numbers.