1.8. find
¶
This module provides a means by which data files distributed with the application can be found at run time by searching a configurable set of directories.
1.8.1. Data¶
1.8.2. Functions¶
-
data_path_append
(path)[source]¶ Add a directory to the data search path. The directory will be used by the
data_file()
anddata_directory()
functions.Parameters: path (str) – The path to add for searching.
-
data_directory
(name, access_mode=4)[source]¶ Locate a subdirectory in the data search path.
Parameters: Returns: The path to the located directory.
Return type:
-
data_file
(name, access_mode=4)[source]¶ Locate a data file by searching the directories specified in
ENV_VAR
. If access_mode is specified, it needs to be a value suitable for use withos.access()
.Parameters: Returns: The path to the located file.
Return type: