On Wed, May 3, 2017 at 8:20 AM, Terry Brown <terrynbr...@gmail.com> wrote:

> On Wed, 3 May 2017 04:16:50 -0700 (PDT)
> tscv11 <tsc.v...@gmail.com> wrote:
>
> > So now I have my work cut out for me. I'm very open to
> > hearing suggestions or requests regarding a possible
> > sqlite3 plugin for Leo (my basic idea is to create a read/write
> > relationship between db3 files and Leo outlines, via Leo).
>
> So are you wanting to read (and write?) a representation of your habit
> tracking app. from SQLite, or read and write Leo outlines in general
> from SQLite?  The former might be a good starting point.  Something like
>
> con = sqlite3.connect("mydb.sqlite3")
> cur = con.cursor()
> cur.execute("select name from habit_types")
> for row in cur.fetchall():
>     name = row[0]
>     node = p.insertAsLastChild()
>     node.h = name
> c.redraw()
>
>
> Now Edward's going to tell me you should call something other than
> c.redraw() at the end, but I bet that would work ;-)
>

​c.redraw() usually works...

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to