Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/appdirs-1.4.3.dist-info/DESCRIPTION.rst @ 5:9b1c78e6ba9c draft default tip
"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author | shellac |
---|---|
date | Mon, 01 Jun 2020 08:59:25 -0400 |
parents | 79f47841a781 |
children |
comparison
equal
deleted
inserted
replaced
4:79f47841a781 | 5:9b1c78e6ba9c |
---|---|
1 | |
2 .. image:: https://secure.travis-ci.org/ActiveState/appdirs.png | |
3 :target: http://travis-ci.org/ActiveState/appdirs | |
4 | |
5 the problem | |
6 =========== | |
7 | |
8 What directory should your app use for storing user data? If running on Mac OS X, you | |
9 should use:: | |
10 | |
11 ~/Library/Application Support/<AppName> | |
12 | |
13 If on Windows (at least English Win XP) that should be:: | |
14 | |
15 C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName> | |
16 | |
17 or possibly:: | |
18 | |
19 C:\Documents and Settings\<User>\Application Data\<AppAuthor>\<AppName> | |
20 | |
21 for `roaming profiles <http://bit.ly/9yl3b6>`_ but that is another story. | |
22 | |
23 On Linux (and other Unices) the dir, according to the `XDG | |
24 spec <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_, is:: | |
25 | |
26 ~/.local/share/<AppName> | |
27 | |
28 | |
29 ``appdirs`` to the rescue | |
30 ========================= | |
31 | |
32 This kind of thing is what the ``appdirs`` module is for. ``appdirs`` will | |
33 help you choose an appropriate: | |
34 | |
35 - user data dir (``user_data_dir``) | |
36 - user config dir (``user_config_dir``) | |
37 - user cache dir (``user_cache_dir``) | |
38 - site data dir (``site_data_dir``) | |
39 - site config dir (``site_config_dir``) | |
40 - user log dir (``user_log_dir``) | |
41 | |
42 and also: | |
43 | |
44 - is a single module so other Python packages can include their own private copy | |
45 - is slightly opinionated on the directory names used. Look for "OPINION" in | |
46 documentation and code for when an opinion is being applied. | |
47 | |
48 | |
49 some example output | |
50 =================== | |
51 | |
52 On Mac OS X:: | |
53 | |
54 >>> from appdirs import * | |
55 >>> appname = "SuperApp" | |
56 >>> appauthor = "Acme" | |
57 >>> user_data_dir(appname, appauthor) | |
58 '/Users/trentm/Library/Application Support/SuperApp' | |
59 >>> site_data_dir(appname, appauthor) | |
60 '/Library/Application Support/SuperApp' | |
61 >>> user_cache_dir(appname, appauthor) | |
62 '/Users/trentm/Library/Caches/SuperApp' | |
63 >>> user_log_dir(appname, appauthor) | |
64 '/Users/trentm/Library/Logs/SuperApp' | |
65 | |
66 On Windows 7:: | |
67 | |
68 >>> from appdirs import * | |
69 >>> appname = "SuperApp" | |
70 >>> appauthor = "Acme" | |
71 >>> user_data_dir(appname, appauthor) | |
72 'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp' | |
73 >>> user_data_dir(appname, appauthor, roaming=True) | |
74 'C:\\Users\\trentm\\AppData\\Roaming\\Acme\\SuperApp' | |
75 >>> user_cache_dir(appname, appauthor) | |
76 'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Cache' | |
77 >>> user_log_dir(appname, appauthor) | |
78 'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Logs' | |
79 | |
80 On Linux:: | |
81 | |
82 >>> from appdirs import * | |
83 >>> appname = "SuperApp" | |
84 >>> appauthor = "Acme" | |
85 >>> user_data_dir(appname, appauthor) | |
86 '/home/trentm/.local/share/SuperApp | |
87 >>> site_data_dir(appname, appauthor) | |
88 '/usr/local/share/SuperApp' | |
89 >>> site_data_dir(appname, appauthor, multipath=True) | |
90 '/usr/local/share/SuperApp:/usr/share/SuperApp' | |
91 >>> user_cache_dir(appname, appauthor) | |
92 '/home/trentm/.cache/SuperApp' | |
93 >>> user_log_dir(appname, appauthor) | |
94 '/home/trentm/.cache/SuperApp/log' | |
95 >>> user_config_dir(appname) | |
96 '/home/trentm/.config/SuperApp' | |
97 >>> site_config_dir(appname) | |
98 '/etc/xdg/SuperApp' | |
99 >>> os.environ['XDG_CONFIG_DIRS'] = '/etc:/usr/local/etc' | |
100 >>> site_config_dir(appname, multipath=True) | |
101 '/etc/SuperApp:/usr/local/etc/SuperApp' | |
102 | |
103 | |
104 ``AppDirs`` for convenience | |
105 =========================== | |
106 | |
107 :: | |
108 | |
109 >>> from appdirs import AppDirs | |
110 >>> dirs = AppDirs("SuperApp", "Acme") | |
111 >>> dirs.user_data_dir | |
112 '/Users/trentm/Library/Application Support/SuperApp' | |
113 >>> dirs.site_data_dir | |
114 '/Library/Application Support/SuperApp' | |
115 >>> dirs.user_cache_dir | |
116 '/Users/trentm/Library/Caches/SuperApp' | |
117 >>> dirs.user_log_dir | |
118 '/Users/trentm/Library/Logs/SuperApp' | |
119 | |
120 | |
121 | |
122 Per-version isolation | |
123 ===================== | |
124 | |
125 If you have multiple versions of your app in use that you want to be | |
126 able to run side-by-side, then you may want version-isolation for these | |
127 dirs:: | |
128 | |
129 >>> from appdirs import AppDirs | |
130 >>> dirs = AppDirs("SuperApp", "Acme", version="1.0") | |
131 >>> dirs.user_data_dir | |
132 '/Users/trentm/Library/Application Support/SuperApp/1.0' | |
133 >>> dirs.site_data_dir | |
134 '/Library/Application Support/SuperApp/1.0' | |
135 >>> dirs.user_cache_dir | |
136 '/Users/trentm/Library/Caches/SuperApp/1.0' | |
137 >>> dirs.user_log_dir | |
138 '/Users/trentm/Library/Logs/SuperApp/1.0' | |
139 | |
140 | |
141 | |
142 appdirs Changelog | |
143 ================= | |
144 | |
145 appdirs 1.4.3 | |
146 ------------- | |
147 - [PR #76] Python 3.6 invalid escape sequence deprecation fixes | |
148 - Fix for Python 3.6 support | |
149 | |
150 appdirs 1.4.2 | |
151 ------------- | |
152 - [PR #84] Allow installing without setuptools | |
153 - [PR #86] Fix string delimiters in setup.py description | |
154 - Add Python 3.6 support | |
155 | |
156 appdirs 1.4.1 | |
157 ------------- | |
158 - [issue #38] Fix _winreg import on Windows Py3 | |
159 - [issue #55] Make appname optional | |
160 | |
161 appdirs 1.4.0 | |
162 ------------- | |
163 - [PR #42] AppAuthor is now optional on Windows | |
164 - [issue 41] Support Jython on Windows, Mac, and Unix-like platforms. Windows | |
165 support requires `JNA <https://github.com/twall/jna>`_. | |
166 - [PR #44] Fix incorrect behaviour of the site_config_dir method | |
167 | |
168 appdirs 1.3.0 | |
169 ------------- | |
170 - [Unix, issue 16] Conform to XDG standard, instead of breaking it for | |
171 everybody | |
172 - [Unix] Removes gratuitous case mangling of the case, since \*nix-es are | |
173 usually case sensitive, so mangling is not wise | |
174 - [Unix] Fixes the utterly wrong behaviour in ``site_data_dir``, return result | |
175 based on XDG_DATA_DIRS and make room for respecting the standard which | |
176 specifies XDG_DATA_DIRS is a multiple-value variable | |
177 - [Issue 6] Add ``*_config_dir`` which are distinct on nix-es, according to | |
178 XDG specs; on Windows and Mac return the corresponding ``*_data_dir`` | |
179 | |
180 appdirs 1.2.0 | |
181 ------------- | |
182 | |
183 - [Unix] Put ``user_log_dir`` under the *cache* dir on Unix. Seems to be more | |
184 typical. | |
185 - [issue 9] Make ``unicode`` work on py3k. | |
186 | |
187 appdirs 1.1.0 | |
188 ------------- | |
189 | |
190 - [issue 4] Add ``AppDirs.user_log_dir``. | |
191 - [Unix, issue 2, issue 7] appdirs now conforms to `XDG base directory spec | |
192 <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. | |
193 - [Mac, issue 5] Fix ``site_data_dir()`` on Mac. | |
194 - [Mac] Drop use of 'Carbon' module in favour of hardcoded paths; supports | |
195 Python3 now. | |
196 - [Windows] Append "Cache" to ``user_cache_dir`` on Windows by default. Use | |
197 ``opinion=False`` option to disable this. | |
198 - Add ``appdirs.AppDirs`` convenience class. Usage: | |
199 | |
200 >>> dirs = AppDirs("SuperApp", "Acme", version="1.0") | |
201 >>> dirs.user_data_dir | |
202 '/Users/trentm/Library/Application Support/SuperApp/1.0' | |
203 | |
204 - [Windows] Cherry-pick Komodo's change to downgrade paths to the Windows short | |
205 paths if there are high bit chars. | |
206 - [Linux] Change default ``user_cache_dir()`` on Linux to be singular, e.g. | |
207 "~/.superapp/cache". | |
208 - [Windows] Add ``roaming`` option to ``user_data_dir()`` (for use on Windows only) | |
209 and change the default ``user_data_dir`` behaviour to use a *non*-roaming | |
210 profile dir (``CSIDL_LOCAL_APPDATA`` instead of ``CSIDL_APPDATA``). Why? Because | |
211 a large roaming profile can cause login speed issues. The "only syncs on | |
212 logout" behaviour can cause surprises in appdata info. | |
213 | |
214 | |
215 appdirs 1.0.1 (never released) | |
216 ------------------------------ | |
217 | |
218 Started this changelog 27 July 2010. Before that this module originated in the | |
219 `Komodo <http://www.activestate.com/komodo>`_ product as ``applib.py`` and then | |
220 as `applib/location.py | |
221 <http://github.com/ActiveState/applib/blob/master/applib/location.py>`_ (used by | |
222 `PyPM <http://code.activestate.com/pypm/>`_ in `ActivePython | |
223 <http://www.activestate.com/activepython>`_). This is basically a fork of | |
224 applib.py 1.0.1 and applib/location.py 1.0.1. | |
225 | |
226 | |
227 |