We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
data_home
Path()
1 parent e32edd8 commit c44bcd3Copy full SHA for c44bcd3
1 file changed
libsvmdata/abstraction.py
@@ -14,12 +14,14 @@ def _get_data_home(subdir_name=""):
14
seek for the variable $XDG_DATA_HOME. Finally, the fallback is $HOME/data.
15
"""
16
data_home = os.environ.get("LIBSVMDATA_HOME", None)
17
+
18
if data_home is None:
19
data_home = os.environ.get("XDG_DATA_HOME", None)
20
21
data_home = Path.home() / "data"
22
else:
23
data_home = Path(data_home)
24
25
return data_home / subdir_name if subdir_name else data_home
26
27
0 commit comments