On Oct 17, 11:51 pm, Ivanov Dmitriy <[email protected]> wrote: > There is one enhancement, that I don't know how to do myself: I don't > what to upload the files, that weren't changed since the last upload, > so I need some kind of DB table, that will have this structure: > > | local file name | server file name | last modify date time | > > If last modify has changed, then upload. Now I have this simple DB as > a matrix in code - files array. What is the best way to implement this > feature in python inside leo? I don't think, that Mysql or Oracle > would be good choice for this. :)))
Are you sure you need a relational database? Don't mix databases with persistence, because that's what you need. I would use a database only if I would have a couple of tables, a couple of relations and using SQL would make it much easier. In your case, I would just use a dictionary with file names as keys and would store it using JSON. Recent versions of Python bundle JSON parsing modules by default and converting between JSON and simple Python data structures like list/dictionaries is the easiest possible thing. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
