Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61993
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ikorot01@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; ';-)': 0.03; 'mrab': 0.05; 'paths': 0.07; 'string': 0.09; 'cursor': 0.09; 'parameter': 0.09; 'subject:extra': 0.09; 'windows,': 0.09; 'command.': 0.16; 'did.': 0.16; 'igor': 0.16; 'literals': 0.16; 'skip:d 60': 0.16; 'subject:variable': 0.16; 'tim,': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'example': 0.22; 'import': 0.22; 'specify': 0.24; '15,': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'tim': 0.29; 'dec': 0.30; 'important.': 0.30; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; '>>>>': 0.31; 'chase': 0.31; 'omitted': 0.31; 'url:python': 0.33; 'beginning': 0.33; 'raw': 0.33; 'skip:s 30': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'url:listinfo': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'thank': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'even': 0.60; 'you.': 0.62; '4:29': 0.84; 'or:': 0.84; 'crucial': 0.91; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=NQdTwxatuhdDL2nCdNhsvkGg5uuxo9gkRCf2nAHBkIw=; b=gxmwvnaWS9ciT6EmXgzdSBD+GyyG01KUalo2+dST57w/SSTDZVfAHpSFql+UFF/Y38 iuH+6pw6JNL2dUPi43hMlVtn8pmId+j9dJDz4pt04UDWGiuqG4eGnRi05P7cpFupjct2 tE0De0m0bND+HoBe2nBZV12RnuQNMyNDsWEm9mhVgsGVYbuKQ685mX5Wjc7euuoFCLe/ FAsp6vcwLwe1UobTtl5VitI9wTPMG2EonWpo7P/2jA2BwSaWuw7q5dpawU18vPEbXKkO 55saDcWPgGtxx78ghc94rKTQBabqjC100VquVMam0daYIPvEs0dB9dTygDsU7wgCgPll kKVA== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.120.11 with SMTP id ky11mr2566413vdb.28.1387167860212; Sun, 15 Dec 2013 20:24:20 -0800 (PST) |
| In-Reply-To | <52AE5037.5000300@mrabarnett.plus.com> |
| References | <CA+FnnTzDjRzU65+VWnOwxfVR9FGMDgHLLmLEDOoGE0BMCptzEw@mail.gmail.com> <52A25D94.9040404@islandtraining.com> <CA+FnnTxxJc2J1SF0UHXo1DkZPdN0W5iWhOgBYzfbW1T0GtaSgg@mail.gmail.com> <CA+FnnTzBYp5Fvy1ohCySLitbL21+hHdfur9=oF4TM+Skeu-XJw@mail.gmail.com> <CA+FnnTzkHYNN_rgLaaXwvod9qGhetXRy+3v96+5+wEyhCq0LwA@mail.gmail.com> <CA+FnnTwZ3aF++ZzaAJzG0Y98usfLTge0KTzj14LfqDgh1OnsZQ@mail.gmail.com> <20131208125823.241112db@bigbox.christie.dr> <mailman.3738.1386529877.18130.python-list@python.org> <roy-E243A9.15072508122013@news.panix.com> <CA+FnnTyZzrhwkLvsY0EdvXD_PoTWK45C0=peWGWtse1uEwJC=Q@mail.gmail.com> <CA+FnnTwSKYs-RAqVT-fZpotte30+xC-oUx-qnidw_qA=uv+KSA@mail.gmail.com> <20131208161858.1365f2d7@bigbox.christie.dr> <CA+FnnTz-T8S3Z-Qaa7T_mHke-1+XN8-iZifnhBoS+aWQhje46A@mail.gmail.com> <20131215061720.2fbb394d@bigbox.christie.dr> <20131215062923.184bf636@bigbox.christie.dr> <CA+FnnTyuvD2sMdYaQYt39vH_BE-a9o3rLSJ3stmXzNiFEQqcoA@mail.gmail.com> <52AE5037.5000300@mrabarnett.plus.com> |
| Date | Sun, 15 Dec 2013 20:24:20 -0800 |
| Subject | Re: Eliminate "extra" variable |
| From | Igor Korot <ikorot01@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4171.1387167868.18130.python-list@python.org> (permalink) |
| Lines | 65 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1387167868 news.xs4all.nl 2867 [2001:888:2000:d::a6]:59150 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:61993 |
Show key headers only | View raw
Hi,
I have the same result even with:
sqlite3.connect(r'...')
Any other alternatives?
Thank you.
On Sun, Dec 15, 2013 at 4:58 PM, MRAB <python@mrabarnett.plus.com> wrote:
> On 15/12/2013 22:46, Igor Korot wrote:
>>
>> Tim,
>>
>> On Sun, Dec 15, 2013 at 4:29 AM, Tim Chase
>> <python.list@tim.thechases.com> wrote:
>>>
>>> On 2013-12-15 06:17, Tim Chase wrote:
>>>>>>>>>
>>>>>>>>> conn = sqlite3.connect('x.sqlite',
>>>>>>
>>>>>> ... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
>>>>
>>>>
>>>> Your example code omitted this one crucial line. Do you specify the
>>>> detect_types parameter to connect()?
>>
>>
>> Yes, I did.
>> This is the beginning of the session:
>>
>>>>> import sqlite3
>>>>> conn = sqlite3.connect('c:\Documents and
>>>>> Settings\Igor.FORDANWORK\Desktop\mydb.db', detect_types =
>>>>> sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
>>
>>
> When writing paths on Windows, it's a good idea to use raw string
> literals or slashes instead of backslashes:
>
> conn = sqlite3.connect(r'c:\Documents and
> Settings\Igor.FORDANWORK\Desktop\mydb.db', detect_types =
> sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
>
> or:
>
> conn = sqlite3.connect('c:/Documents and
> Settings/Igor.FORDANWORK/Desktop/mydb.db', detect_types =
> sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
>
>
>> Also please note that you session was missing the cursor creation command.
>> ;-)
>>
>> Thank you.
>>
>>>
>>> It's really the PARSE_DECLTYPES that is important.
>>>
>>> http://docs.python.org/2/library/sqlite3.html#sqlite3.PARSE_DECLTYPES
>>>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Eliminate "extra" variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-08 19:10 +0000
Re: Eliminate "extra" variable Roy Smith <roy@panix.com> - 2013-12-08 15:07 -0500
Fwd: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-08 12:58 -0800
Re: Eliminate "extra" variable Tim Chase <python.list@tim.thechases.com> - 2013-12-08 16:18 -0600
Re: Fwd: Eliminate "extra" variable Dave Angel <davea@davea.name> - 2013-12-08 17:36 -0500
Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-14 23:49 -0800
Re: Eliminate "extra" variable Tim Chase <python.list@tim.thechases.com> - 2013-12-15 06:17 -0600
Re: Eliminate "extra" variable Tim Chase <python.list@tim.thechases.com> - 2013-12-15 06:29 -0600
Re: Eliminate "extra" variable Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-12-15 12:08 -0500
Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-15 14:46 -0800
Re: Eliminate "extra" variable MRAB <python@mrabarnett.plus.com> - 2013-12-16 00:58 +0000
Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-15 18:43 -0800
Re: Eliminate "extra" variable Dave Angel <davea@davea.name> - 2013-12-15 21:58 -0500
Re: Eliminate "extra" variable Chris Angelico <rosuav@gmail.com> - 2013-12-16 13:57 +1100
Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-15 20:24 -0800
csiph-web