There is XDG Base Directory Specification which dictates which files should go where.
According to that user data should go to $XDG_DATA_HOME on linux.
|
history_filename = ".mitype_history.csv" |
Without adding extra pip dependency:
from sys import platform
if platform == "linux" or platform == "linux2":
XDG_DATA_HOME = os.environ.get('XDG_DATA_HOME', os.path.expanduser("~/.local/share"))
user_data_file = XDG_DATA_HOME + "/.mitype_history.csv"
return os.path.expanduser(user_data_file)
else:
# as usual for windows
There is XDG Base Directory Specification which dictates which files should go where.
According to that user data should go to $XDG_DATA_HOME on linux.
mitype/mitype/history.py
Line 17 in cdb2da1
Without adding extra pip dependency: