biogeme.filenames module

Implements the function providing names for the output .py.

author:

Michel Bierlaire

date:

Tue Mar 26 16:48:40 2019

biogeme.filenames.get_new_file_name(name, ext)[source]

Generate a file name that does not exist.

Parameters:
  • name (str) – name of the file.

  • ext (str) – file extension.

Return type:

str

Returns:

name.ext if the file does not exist. If it does, returns name~xx.ext, where xx is the smallest integer such that the corresponding file does not exist. It is designed to avoid erasing output .py inadvertently.