Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77277
| References | <ltpseg$p9m$1@ger.gmane.org> <CAPTjJmrJBciRuterUKWP=QTQXd8xYquM4nx+oFd-TWM5ooskbA@mail.gmail.com> <ltpvb6$16e$1@ger.gmane.org> <CAPTjJmp68Kh5zCXq50pi0yeaaapnQotxYBg1+f58Mv__Xd99Lg@mail.gmail.com> <ltq1o5$109$1@ger.gmane.org> |
|---|---|
| Date | 2014-08-30 00:19 +1000 |
| Subject | Re: Keeping python code and database in sync |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13611.1409321973.18130.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Keeping python code and database in sync Chris Angelico <rosuav@gmail.com> - 2014-08-30 00:19 +1000
csiph-web