Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #13237
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: problem:import csv data |
| Date | 2011-09-13 09:57 -0700 |
| Organization | > Bestiaria Support Staff < |
| References | <tencent_727B2E693BE1A5F92159BCAB@qq.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1079.1315933060.27778.python-list@python.org> (permalink) |
On Tue, 13 Sep 2011 19:14:15 +0800, "ÊØÖê´ýÍÃ" <1248283536@qq.com>
declaimed the following in gmane.comp.python.general:
<snip>
> the output is :
> cur.execute('.separator"," ')
> sqlite3.OperationalError: near ".": syntax error
>
> how to fix it?
Don't try to use SQLite3 "." commands from a Python program.
"." commands are directives to the SQLite interactive /client/,
controlling how said client formats output from (or parses input to) the
SQLite3 engine. But your Python program only "talks" to the engine --
the script IS the client and is responsible for parsing/formatting the
data that is passed via regular SQL statements.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: problem:import csv data Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-09-13 09:57 -0700
csiph-web