On 04/11/2010 11:09 AM, Nikolaus Rath wrote:
> Yes, you remember correctly. Actually that would be a perfect solution.
> But how do I use it? It seems to me that I need to pass some argument to
> Shell.command_dump(), because the following just produces an empty file:
>
>
> import apsw
> ofh = open('dump.txt', 'w')
> db = apsw.Connection('test.db')
> s = apsw.Shell(db=db, stdout=ofh)
> s.command_dump('.dump')
That is asking it to dump the tables named '.', 'd', 'u', 'm' and 'p' :-)
I'd suggest the more orthodox way of invoking commands which is less likely
to catch you out like this.
s.process_command(".dump")
Roger
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users