For Linux the XDG base directory specification (
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)
is fairly reasonable. It divides user-specific files into configuration, essential data, cache data, and runtime files as well as providing a hierarchy of where to look for files. I think Windows everything is supposed to get dumped into AppData. I am not
sure what the model is on OS X.
From a practical standpoint, there are not many references to prefs.paths['userPrefsDir'] in the code base and my ~/.psychopy2 directory does not have too many files in it:
appData.cfg: This is a configuration file and should be in
$XDG_CONFIG_HOME/psychopy2/
benchmarkReport.html: This seems like cache data
and should be in $XDG_CACHE_HOME/psychopy2/
firstrunReport.html: This seems like cache data and should be in
$XDG_CACHE_HOME/psychopy2/
monitors: This is a directory
default.calib: This seems like essential data and should be in
$XDG_DATA_HOME/psychopy2/
testMonitor.calib: This seems like essential data
and should be in $XDG_DATA_HOME/psychopy2/
userPrefs.cfg: This is a configuration file and should be in
$XDG_CONFIG_HOME/psychopy2/
The .ihpid file seems like it is a runtime file and should be in
$XDG_RUNTIME_HOME/psychopy2/
I think we should consider defining, in addition to prefs.paths['userPrefsDir'] , prefs.paths['userDataDir'], prefs.paths['userCacheDir'], and prefs.paths['userRuntimeDir']. We should think about the name of userDataDir since it could be confusing to people
(and possibly already exists). We could keep these new directories hidden from the user and on Windows and OS X just set them to be prefs.paths['userPrefsDir'] while on Linux we could use the correct directories. Then when we read and write files, we need
to be careful to look in the correct directory.