python - Where to store data files generated by linux software? -
python - Where to store data files generated by linux software? -
i have python script make install
(by default /usr/local/lib/python2.7/dist-packages/) alternative available. script generates files user-specific mutable info during script's normal usage. seems me should not maintain compiled script files in couple data. conventional default place store software info in such cases?
summarizing filesystem hierarchy standard:
immutable architecture-independent info should go in /usr/share
or /usr/local/share
. mutable info should go in user's home directory if it's user-specific (xdg provides more guidance here), or in /var
if it's system-wide (this requires group-owned directory , files, , setgid application, allow writing shared file).
/usr/share
, /usr/local/share
have construction mirrors /usr/lib
, /usr/local/lib
; don't know python, perl has module file::sharedir helps module installing , accessing info in share directory corresponding directory module installed.
and don't forget other option: ask user info should go.
python linux datastore project-structure
Comments
Post a Comment