Re: sqlite3.OperationalError: near ".": syntax error

2014-09-19 Thread Peter Otten
ost recent call last): >File "", line 1, in > sqlite3.OperationalError: near ".": syntax error > > > why " cur.execute('.tables') " can't get output? .tables is a feature of the sqlite console, not part of sqlite's

Re: sqlite3.OperationalError: near ".": syntax error

2014-09-19 Thread Lele Gaifax
luofeiyu writes: > why " cur.execute('.tables') " can't get output? Most probably because that is not an SQL statement, but a command implemented by the SQLite command line client. To get the list of tables, the following may work for you: >>> import sqlite3 >>> con = sqlite3.connect('devel

sqlite3.OperationalError: near ".": syntax error

2014-09-19 Thread luofeiyu
rofit sqlite> import slqite3 con = sqlite3.connect('F:\\workspace\\china\\data\\china.sqlite') cur = con.cursor() cur.execute('.tables') Traceback (most recent call last): File "", line 1, in sqlite3.OperationalError: ne

sqlite3.OperationalError: near ".": syntax error

2014-09-19 Thread luofeiyu
rofit sqlite> import slqite3 con = sqlite3.connect('F:\\workspace\\china\\data\\china.sqlite') cur = con.cursor() cur.execute('.tables') Traceback (most recent call last): File "", line 1, in sqlite3.OperationalError: near ".