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


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

Re: Keeping python code and database in sync

Started byChris Angelico <rosuav@gmail.com>
First post2014-08-30 00:19 +1000
Last post2014-08-30 00:19 +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: Keeping python code and database in sync Chris Angelico <rosuav@gmail.com> - 2014-08-30 00:19 +1000

#77277 — Re: Keeping python code and database in sync

FromChris Angelico <rosuav@gmail.com>
Date2014-08-30 00:19 +1000
SubjectRe: Keeping python code and database in sync
Message-ID<mailman.13611.1409321973.18130.python-list@python.org>
On Sat, Aug 30, 2014 at 12:12 AM, Frank Millman <frank@chagford.com> wrote:
> Once downloaded, the 'py' files are automatically 'live', because that is
> how python works. But the xml file will just be sitting in a directory.
> *Something* has to trigger running a program that reads the xml file and
> inserts it into the database.

I'm not 100% certain of this distinction, but it depends on how your
code gets invoked.

> My idea is to put the 'version number check' in the main program 'start.py'.
> If it detects that an upgrade is required, it will display a warning message
> to the user and then run the upgrade program. The same upgrade program can
> handle both 'schema' changes and (for want of a word) 'meta-data' changes
> such as the menu definition.

Yes... or start.py can do it directly and automatically, just check
and do whatever changes are needed. That's how I'd do it.

ChrisA

[toc] | [standalone]


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


csiph-web