[pysqlite] Can you restore/import from a .sql file?
Al Schmeer <[email protected]> Fri, 20 Feb 2009 15:55:20 -0500
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Ok, the following code will create the TestDB.db:
self.con = sqlite3.connect('c:/Python/Apps/ComicDB/TestDB.db',
isolation_level=None)
self.cur = self.con.cursor()
But how do I "import" what was created in my test.sql file? The code
below does not work.
self.cur.executescript('c:/Python/Apps/ComicDB/test.sql')