[Tutor] Getting at sqlite schema info from within Python?

Terry Carroll carroll at tjc.com
Tue Jun 26 07:33:21 CEST 2007

On Tue, 26 Jun 2007, John Fouhy wrote:

> On 26/06/07, Terry Carroll <carroll at tjc.com> wrote:
> >
> > Is there any way of getting to the schema of an sqlite database from
> > within Python? In particular, a list of tables in the DB.
> Try 'select * from sqlite_master'.

You rock.  Thanks.

And, now that I know that trick, googling on sqlite_master leads me to 
http://www.sqlite.org/faq.html#q7 which explains the format.

Honest, I really did spend quite some time reading the sqlite docs and
trying things; somehow I missed the FAQ.

More information about the Tutor mailing list