pyyeti.guitools.get_file_name¶
- pyyeti.guitools.get_file_name(f, read)[source]¶
Utility function to get the file name using guitools if needed.
- Parameters:
f (
pathlib.Pathobject or string or None) – File name or directory name (something thatos.fspath()accepts) or None. If f is not None or is not a directory name, this routine just returns it as is. If it is a directory name, it is used as the initialdir option toaskopenfilename()orasksaveasfilename().read (bool) – If True, calls
askopenfilename()to get file name. Otherwise,asksaveasfilename()is called.
- Returns:
filename (string) – The selected filename.