Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93661 > unrolled thread

Re: [setuptools] install data-file in users home-dir

Started byChris Angelico <rosuav@gmail.com>
First post2015-07-11 10:40 +1000
Last post2015-07-11 10:40 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [setuptools] install data-file in users home-dir Chris Angelico <rosuav@gmail.com> - 2015-07-11 10:40 +1000

#93661 — Re: [setuptools] install data-file in users home-dir

FromChris Angelico <rosuav@gmail.com>
Date2015-07-11 10:40 +1000
SubjectRe: [setuptools] install data-file in users home-dir
Message-ID<mailman.409.1436575243.3674.python-list@python.org>
On Sat, Jul 11, 2015 at 10:01 AM,  <c.buhtz@posteo.jp> wrote:
> On 2015-07-10 09:39 Chris Warrick <kwpolska@gmail.com> wrote:
>> And you should not create the files in your install script.  Instead,
>> install them to a different data dir (somewhere in 'share/appname', or
>> alongside your package). When someone runs your app, only then you
>> should copy this file to user’s config directory
>
> I have to check if there still is a user config file.
> When doing this with the app itself, the check would be done while each
> start - what is quite unnecessary.

Wrong. It is completely necessary. What happens if (a) the user
deletes the config file? (b) a different user runs the app? (c) a hard
drive melt-down wipes out all home directories, and the sysadmin
restores from last night's backup (which was before the app was
installed)? You MUST check for the absence of the user config file.
Most programs will be expected to function correctly after having
their configs wiped out - it's a standard way of saying "go back to
all defaults".

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web