Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77277 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-08-30 00:19 +1000 |
| Last post | 2014-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.
Re: Keeping python code and database in sync Chris Angelico <rosuav@gmail.com> - 2014-08-30 00:19 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-08-30 00:19 +1000 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web