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


Groups > comp.lang.python > #93661

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

References <3mSGXb0tfQzFpW3@dovecot04.posteo.de> <CAMw+j7+hUvj0-T4AoqG4X2RB6XUP4U0Unf=q2M8wT1_BEWKiZA@mail.gmail.com> <3mSryL0jHmzFpVq@dovecot04.posteo.de>
Date 2015-07-11 10:40 +1000
Subject Re: [setuptools] install data-file in users home-dir
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.409.1436575243.3674.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web