On 15/06/17 14:45, Larry Martell wrote:
> I am trying to use sqlite
>
> $ python2.7
> Python 2.7.10 (default, Feb 22 2016, 12:13:36)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import _sqlite3
> Traceback (most r
On Thu, Jun 15, 2017 at 1:44 PM, Kushal Kumaran wrote:
> Your python was built without sqlite3 support. If your yum repo
> provider is unable to rebuild with sqlite3, you can do so yourself.
> Make sure the sqlite-devel package is installed so your python build
> will use it.
Decided to do this
Larry Martell writes:
> On Thu, Jun 15, 2017 at 12:20 PM, Kushal Kumaran wrote:
>> Larry Martell writes:
>>
>>> On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote:
Larry Martell wrote:
>> On linux the system sqlite3 is used.
>
> I tried building and ins
On Thu, Jun 15, 2017 at 12:20 PM, Kushal Kumaran wrote:
> Larry Martell writes:
>
>> On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote:
>>> Larry Martell wrote:
>>>
> On linux the system sqlite3 is used.
I tried building and installing sqlite from source and tha
Larry Martell writes:
> On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote:
>> Larry Martell wrote:
>>
On linux the system sqlite3 is used.
>>>
>>> I tried building and installing sqlite from source and that did not
>>> solve the problem.
>>
>> You misunderstood: the prob
Larry Martell wrote:
> Sorry I mistyped - it wasn't pip it was yum.
OK, I'm out then. Looks like what works for Debian derivatives is not easily
transferable to Redhead...
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote:
> Larry Martell wrote:
>
>>> On linux the system sqlite3 is used.
>>
>> I tried building and installing sqlite from source and that did not
>> solve the problem.
>
> You misunderstood: the problem is not sqlite3 it's that pytho
Larry Martell wrote:
>> On linux the system sqlite3 is used.
>
> I tried building and installing sqlite from source and that did not
> solve the problem.
You misunderstood: the problem is not sqlite3 it's that python needs
sqlite3's header files.
>> Is that a Python version that you compiled y
On Thu, Jun 15, 2017 at 9:55 AM, Peter Otten <__pete...@web.de> wrote:
> Larry Martell wrote:
>
>> On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list
>> wrote:
>>> On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com
>>> wrote:
I am trying to use sqlite
Larry Martell wrote:
> On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list
> wrote:
>> On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com
>> wrote:
>>> I am trying to use sqlite
>>>
>>> $ python2.7
>>> Python 2.7.10 (default, Feb 22 2016, 12:13:36)
>>> [GCC 4.4.7 20
On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list
wrote:
> On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com wrote:
>> I am trying to use sqlite
>>
>> $ python2.7
>> Python 2.7.10 (default, Feb 22 2016, 12:13:36)
>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux
On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com wrote:
> I am trying to use sqlite
>
> $ python2.7
> Python 2.7.10 (default, Feb 22 2016, 12:13:36)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
>
> As you've written it, the statement declares your intent to enter both
> ‘conn’ and ‘conn.cursor()’ as context managers.
>
> https://docs.python.org/3/reference/compound_stmts.html#with>
>
> To “enter a context manager” entails calling the ‘__enter__’ method on
> the context manager obje
On Monday, 16 May 2016 12:45:26 UTC+10, DFS wrote:
> On 5/15/2016 10:21 PM, Sayth Renshaw wrote:
> > Hi
> >
> > I have a file and want to create the sqlite3 db. Using with however i
> > receive an attribute error and it causes an exit.
> >
> > The relevant section of the file is:
> >
> > import s
Sayth Renshaw writes:
> with conn, conn.cursor() as cur:
What are you expecting this ‘with’ statement to do?
As you've written it, the statement declares your intent to enter both
‘conn’ and ‘conn.cursor()’ as context managers.
https://docs.python.org/3/reference/compound_stmts.html#with>
On 02/22/2016 09:32 AM, Klaus Jantzen wrote:
On 02/21/2016 10:37 PM, Albert-Jan Roskam wrote:
(Sorry for top posting)
IIRC, you have to do
sudo apt-get install build-essential python-dev
... then re-compile python
> To: [[1]1]python-list@python.org
> F
On Mon, Feb 22, 2016 at 7:40 PM, Klaus Jantzen wrote:
>That did not work because I did not install Python 3.5. with apt-get
>but downloaded the source and compiled myself.
>Thus apt-get does not have any information about the Python 3.5
>installation.
It generally does work; the b
On 02/22/2016 02:44 AM, Chris Angelico wrote:
On Mon, Feb 22, 2016 at 8:37 AM, Albert-Jan Roskam
[1] wrote:
IIRC, you have to do
sudo apt-get install build-essential python-dev
... then re-compile python
That may well work, but it's probably easier to work this way:
sudo apt-get build
On 02/21/2016 10:37 PM, Albert-Jan Roskam wrote:
(Sorry for top posting)
IIRC, you have to do
sudo apt-get install build-essential python-dev
... then re-compile python
> To: [1]python-list@python.org
> From: [2]k.d.jant...@mailbox.org
> Subject: SQLite
On Mon, Feb 22, 2016 at 8:37 AM, Albert-Jan Roskam
wrote:
> IIRC, you have to do
> sudo apt-get install build-essential python-dev
> ... then re-compile python
That may well work, but it's probably easier to work this way:
sudo apt-get build-dep python3
That should grab all the compilation depe
(Sorry for top posting)
IIRC, you have to do
sudo apt-get install build-essential python-dev
... then re-compile python
> To: python-list@python.org
> From: k.d.jant...@mailbox.org
> Subject: SQLite
> Date: Sun, 21 Feb 2016 18:11:18 +0100
>
>Hello,
>
>I have downloaded Python3.5.1 as .t
On Tue, Sep 22, 2015 at 5:12 PM, Sol T wrote:
> I know I can do this per connection, however how can I have it set to
> default? Does this need to be compiled into python?
>
If you need to compile sqlite you might want to look at apsw:
https://github.com/rogerbinns/apsw
Cheers
>
> On Tue, Sep
Hi,
I know I can do this per connection, however how can I have it set to
default? Does this need to be compiled into python?
On Tue, Sep 22, 2015 at 2:04 PM, Ryan Stuart
wrote:
> On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote:
>
>> I would like to have the Sqlite pragma statement "locking_mo
On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote:
> I would like to have the Sqlite pragma statement "locking_mode" set to
> "EXCLUSIVE" by default (RO database). Does this need to be compiled in? How
> might this be achieved?
>
You can issue any PRAGA statement you like using the execute method
Is anyone aware of documentation that describes how to compile various
sqlite options?
On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote:
> hello
>
> I would like to have the Sqlite pragma statement "locking_mode" set to
> "EXCLUSIVE" by default (RO database). Does this need to be compiled in? H
On 1/23/2014 8:24 AM, Asaf Las wrote:
On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote:
Hi,
On my Debian stable 64-bit system, SQLite3 has FTS (full text search)
enabled (although at version 3 rather than the recommended version 4):
Python 3.2.3 (default, Feb 20 2013, 14:4
On Thursday, January 23, 2014 7:09:08 PM UTC+5:30, Mark Lawrence wrote:
> On 23/01/2014 13:24, Asaf Las wrote:
> > It is compile time option.
> > http://www.sqlite.org/compile.html#enable_fts3
> > you have to build it with this option enabled.
> As an option can be represented in a single bit then
On Thursday, 23 January 2014 14:09:19 UTC, Antoine Pitrou wrote:
> Hi,
>
>
>
> Mark Summerfield qtrac.plus.com> writes:
>
> >
>
> > My guess is that on Debian, the packagers install a full SQLite 3 and the
>
> Python package uses that. But on
>
> > Windows I think the Python packagers bun
On Fri, Jan 24, 2014 at 12:39 AM, Mark Lawrence wrote:
>>
>> It is compile time option.
>> http://www.sqlite.org/compile.html#enable_fts3
>> you have to build it with this option enabled.
>>
>
> As an option can be represented in a single bit then presumably the Windows
> msi file only needs an ex
Hi,
Mark Summerfield qtrac.plus.com> writes:
>
> My guess is that on Debian, the packagers install a full SQLite 3 and the
Python package uses that. But on
> Windows I think the Python packagers bundle their own SQLite (quite
rightly since it might not already be installed).
>
> I'd like the W
On Thursday, January 23, 2014 3:39:08 PM UTC+2, Mark Lawrence wrote:
> On 23/01/2014 13:24, Asaf Las wrote:
> As an option can be represented in a single bit then presumably the
> Windows msi file only needs an extra bit to allow for this, or have I
> missed something? While I'm at it what is th
On 23/01/2014 13:24, Asaf Las wrote:
On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote:
Hi,
On my Debian stable 64-bit system, SQLite3 has FTS (full text search)
enabled (although at version 3 rather than the recommended version 4):
Python 3.2.3 (default, Feb 20 2013, 14:44
On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote:
> Hi,
> On my Debian stable 64-bit system, SQLite3 has FTS (full text search)
> enabled (although at version 3 rather than the recommended version 4):
>
> Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2
>
> But on Windows when I use the official Python 3.3 32-bit binary from
> www.python.org this is not enabled.
For an unobtrusive way [1] to gain this, see apsw. For what it's worth, I prefer
this package over the built in module.
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.16
Happy New Year to you as well.
Sent from my iPad
> On Dec 31, 2013, at 7:46 PM, "Igor Korot" wrote:
>
> Hi, ALL,
> I want to wish everybody who is reading and involved with the list
> Happy and oyful New Year!
> Let's have a great time in it and lets make a lot of good products and
> new relea
> This pragma speeds up most processes 10-20 times (yes 10-20):
> pragma synchronous=OFF
>
> See the SQLITE documentation for an explanation.
> I've found no problems with this setting.
Aside from database integrity and consistency? :) I have that one set
to OFF as my case mandates data processing
On Tuesday, September 3, 2013 8:22:42 AM UTC-4, Alister wrote:
> On Mon, 02 Sep 2013 22:13:27 +, Joseph L. Casale wrote:
>
>
>
> > I have been battling an issue hopefully someone here has insight with.
>
> >
>
> > I have a database with a few tables I perform a query against with some
>
On Mon, 02 Sep 2013 22:13:27 +, Joseph L. Casale wrote:
> I have been battling an issue hopefully someone here has insight with.
>
> I have a database with a few tables I perform a query against with some
> joins against columns collated with NOCASE that leverage = comparisons.
>
> Running t
On Tue, Jul 30, 2013 at 3:02 AM, CM wrote:
> If I try additional commits in that same instance of my app being open,
> it gives me the same error every time. If I close the app and re-open
> it, it does not give me this error, with the same or very similar data
> being written in the same routine
On 31/05/12 17:06, Jon Clements wrote:
On Thursday, 31 May 2012 16:25:10 UTC+1, duncan smith wrote:
On 31/05/12 06:15, John Nagle wrote:
On 5/30/2012 6:57 PM, duncan smith wrote:
Hello,
I have been attempting to speed up some code by using an sqlite
database, but I'm not getting the performan
On Thursday, 31 May 2012 16:25:10 UTC+1, duncan smith wrote:
> On 31/05/12 06:15, John Nagle wrote:
> > On 5/30/2012 6:57 PM, duncan smith wrote:
> >> Hello,
> >> I have been attempting to speed up some code by using an sqlite
> >> database, but I'm not getting the performance gains I expected.
>
On 31/05/12 06:15, John Nagle wrote:
On 5/30/2012 6:57 PM, duncan smith wrote:
Hello,
I have been attempting to speed up some code by using an sqlite
database, but I'm not getting the performance gains I expected.
SQLite is a "lite" database. It's good for data that's read a
lot and not change
John Nagle writes:
> If you have 67 columns in a table, you may be approaching the
> problem incorrectly.
+1 SQL QotW, on basis of diplomacy.
The OP may need to learn about database normalisation
https://en.wikipedia.org/wiki/Database_normalization>.
--
\“Sane people have an appr
On 5/30/2012 6:57 PM, duncan smith wrote:
Hello,
I have been attempting to speed up some code by using an sqlite
database, but I'm not getting the performance gains I expected.
SQLite is a "lite" database. It's good for data that's read a
lot and not changed much. It's good for small data
Are you sure you'll still be able to guarantee the ACID'ity of
transactions? What about performance? Also, what kind of load are you
expecting? I believe this will choke under too much simultaneous
queries.
On Mon, Feb 21, 2011 at 4:55 AM, Stef Mientki wrote:
> hello,
>
> knowing that SQllite is
On Nov 29, 10:49 pm, "D'Arcy J.M. Cain" wrote:
> On Mon, 29 Nov 2010 19:11:18 + (UTC)
>
> Tim Harig wrote:
> > > INSERT INTO foo (name) VALUES ('xxx')
>
> > > That's the standard SQL way.
>
> > Yes, it works; but, the OP asked specifically to be able to enter all of
> > the field values, in
On 2010-11-29, D'Arcy J.M. Cain wrote:
> On Mon, 29 Nov 2010 19:11:18 + (UTC)
> Tim Harig wrote:
>> > INSERT INTO foo (name) VALUES ('xxx')
>> >
>> > That's the standard SQL way.
>>
>> Yes, it works; but, the OP asked specifically to be able to enter all of
>> the field values, including t
On Mon, 29 Nov 2010 19:11:18 + (UTC)
Tim Harig wrote:
> > INSERT INTO foo (name) VALUES ('xxx')
> >
> > That's the standard SQL way.
>
> Yes, it works; but, the OP asked specifically to be able to enter all of
> the field values, including the autoincrement field.
You're right, I missed th
On 11/29/2010 1:12 PM, tinauser wrote:
Dear List
I'm writing an application that has to create and populate an SQLite
database.
I'm doing pretty well, but now I'm facing a problem I can not solve.
I create a table with a primary key autoincrement, something like
sqlcmd="CREATE TABLE foo (id INT
On Nov 29, 7:28 pm, Tim Harig wrote:
> On 2010-11-29, tinauser wrote:
>
> > '''
> > INSERT INTO 'foo' VALUES (?,?)
> > '''
> > ,('NULL','yyy'))
>
> s/'NULL'/None/
>
> > I get a datatype mismatch error.
>
> The sqlite module is smart enough to convert between Python types and
> Sqlite types. If y
On 2010-11-29, D'Arcy J.M. Cain wrote:
> On Mon, 29 Nov 2010 13:19:19 -0500
> Mel wrote:
>> tinauser wrote:
>> '''INSERT INTO foo VALUES (NULL, ?)'''
>
> Does this work in SQLite:
>
> INSERT INTO foo (name) VALUES ('xxx')
>
> That's the standard SQL way.
Yes, it works; but, the OP asked specif
On Mon, 29 Nov 2010 13:19:19 -0500
Mel wrote:
> tinauser wrote:
> '''INSERT INTO foo VALUES (NULL, ?)'''
Does this work in SQLite:
INSERT INTO foo (name) VALUES ('xxx')
That's the standard SQL way.
--
D'Arcy J.M. Cain | Democracy is three wolves
http://www.druid.net/darcy/
On 2010-11-29, tinauser wrote:
> '''
> INSERT INTO 'foo' VALUES (?,?)
> '''
> ,('NULL','yyy'))
s/'NULL'/None/
> I get a datatype mismatch error.
The sqlite module is smart enough to convert between Python types and
Sqlite types. If you pass it 'NULL' it thinks you are passing it a string.
Pyth
tinauser writes:
> however, if in python i try to execute a script like:
>
> cur.execute(
> '''
> INSERT INTO 'foo' VALUES (?,?)
> '''
> ,('NULL','yyy'))
,(None, 'yyy'))
Or use VALUES(NULL, ?)
as suggested in another post.
--
John Bokma
tinauser wrote:
> Normally, the sqlite command that works would be
>
> INSERT INTO 'foo' VALUES (NULL, 'yyy' )
>
> however, if in python i try to execute a script like:
>
> cur.execute(
> '''
> INSERT INTO 'foo' VALUES (?,?)
> '''
> ,('NULL','yyy'))
>
> I get a datatype mismatch error.
>
> Ha
Duncan Booth wrote:
>Tim Roberts wrote:
>
>>>However, when it comes to writing-back data to the table, SQLite is
>>>very forgiving and is quite happy to store '25/06/2003' in a date
>>>field,
>>
>> SQLite is essentially typeless. ALL fields are stored as strings,
>> with no interpretation. Y
To all those who have replied on this thread - many thanks. It looks as
though I've got to look further into date objects, SQLite's native date
functions, detect_types, etc..
Regards,
Alan
--
http://mail.python.org/mailman/listinfo/python-list
On 11/26/2010 07:20 AM, Duncan Booth wrote:
Tim Roberts wrote:
SQLite is essentially typeless. ALL fields are stored as
strings, with no interpretation. You can store whatever you
want in any column. The column types are basically there to
remind YOU how to handle the data.
Not all fields
Tim Roberts wrote:
>>However, when it comes to writing-back data to the table, SQLite is
>>very forgiving and is quite happy to store '25/06/2003' in a date
>>field,
>
> SQLite is essentially typeless. ALL fields are stored as strings,
> with no interpretation. You can store whatever you want
Alan Harris-Reid wrote:
>
>I am having design problems with date storage/retrieval using Python and
>SQLite.
>
>I understand that a SQLite date column stores dates as text in ISO
>format (ie. '2010-05-25').
Only if you store it that way.
>So when I display a British date (eg. on a web-page) I
> However, when it comes to writing-back data to the table, SQLite is very
> forgiving and is quite happy to store '25/06/2003' in a date field, but
> this is not ideal because a) I could be left with a mixture of date
> formats in the same column, b) SQLite's date functions only work with
> ISO f
On 25/11/2010 00:45, Alan Harris-Reid wrote:
Hi,
I am having design problems with date storage/retrieval using Python and
SQLite.
I understand that a SQLite date column stores dates as text in ISO
format (ie. '2010-05-25'). So when I display a British date (eg. on a
web-page) I convert the dat
In message <4ca94af8$0$1637$742ec...@news.sonic.net>, John Nagle wrote:
> On 10/3/2010 5:40 PM, Lawrence D'Oliveiro wrote:
>> In message<4ca8c9b6$0$1598$742ec...@news.sonic.net>, John Nagle wrote:
>>
>>> (Personally, I like MySQL, but I fear Oracle will mess it up.)
>>
>> Doesn’t matter whet
On 10/3/2010 5:40 PM, Lawrence D'Oliveiro wrote:
In message<4ca8c9b6$0$1598$742ec...@news.sonic.net>, John Nagle wrote:
(Personally, I like MySQL, but I fear Oracle will mess it up.)
Doesn’t matter whether Oracle messes up the brand called “MySQL” or not.
With Free Software, it’s the so
In message <4ca8c9b6$0$1598$742ec...@news.sonic.net>, John Nagle wrote:
> (Personally, I like MySQL, but I fear Oracle will mess it up.)
Doesn’t matter whether Oracle messes up the brand called “MySQL” or not.
With Free Software, it’s the software that matters, not the brand. And the
softw
In message , Seebs wrote:
> It is stunning how often you can guess which of two packages will be the
> source of a bug just by seeing which one hurts more to look at.
QOTW. :)
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 3, 2010, at 2:21 PM, John Nagle wrote:
> On 10/2/2010 3:06 PM, Seebs wrote:
>
>> I would agree that the word "nonstandard" seems to be a little strong and
>> discouraging. sqlite is a source of joy, a small bright point of decent
>> and functional software in a world full of misbehaving
On 10/2/2010 3:06 PM, Seebs wrote:
I would agree that the word "nonstandard" seems to be a little strong and
discouraging. sqlite is a source of joy, a small bright point of decent
and functional software in a world full of misbehaving crap. While it
does omit a few bits of SQL functionality,
On Sat, 02 Oct 2010 13:06:12 -0700, Ravi wrote:
> The documentation of the sqlite module at
> http://docs.python.org/library/sqlite3.html says:
>
> "...allows accessing the database using a nonstandard variant of the
> SQL..."
>
> But if you see SQLite website they clearly say at
> http://sqlite
On 2010-10-03, Lawrence D'Oliveiro wrote:
> In message , Seebs wrote:
>> sqlite is a source of joy, a small bright point of decent
>> and functional software in a world full of misbehaving crap.
> Have you learnt how to be selective in your downloads yet?
Sadly, as a side-effect of my day job, I
* Ravi:
> The documentation of the sqlite module at
> http://docs.python.org/library/sqlite3.html
> says:
>
> "...allows accessing the database using a nonstandard variant of the
> SQL..."
>
> But if you see SQLite website they clearly say at
> http://sqlite.org/omitted.html that only very few of
In message , Seebs wrote:
> sqlite is a source of joy, a small bright point of decent
> and functional software in a world full of misbehaving crap.
Have you learnt how to be selective in your downloads yet?
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 2 Oct 2010 19:13:11 -0400
Philip Semanchuk wrote:
>
> On Oct 2, 2010, at 6:58 PM, Tim Chase wrote:
>
> > On 10/02/10 17:06, Seebs wrote:
> >> On 2010-10-02, Ravi wrote:
> >>> The documentation of the sqlite module at
> >>> http://docs.python.org/library/sqlite3.html says:
> >>
> >>> ".
On Oct 2, 2010, at 6:58 PM, Tim Chase wrote:
> On 10/02/10 17:06, Seebs wrote:
>> On 2010-10-02, Ravi wrote:
>>> The documentation of the sqlite module at
>>> http://docs.python.org/library/sqlite3.html says:
>>
>>> "...allows accessing the database using a nonstandard
>>> variant of the SQL...
On 02 Oct 2010 22:06:58 GMT
Seebs wrote:
> I would agree that the word "nonstandard" seems to be a little strong and
> discouraging. sqlite is a source of joy, a small bright point of decent
> and functional software in a world full of misbehaving crap. While it
> does omit a few bits of SQL fun
On 10/02/10 17:06, Seebs wrote:
On 2010-10-02, Ravi wrote:
The documentation of the sqlite module at
http://docs.python.org/library/sqlite3.html says:
"...allows accessing the database using a nonstandard
variant of the SQL..."
I would agree that the word "nonstandard" seems to be a little
On 2010-10-02, Ravi wrote:
> The documentation of the sqlite module at
> http://docs.python.org/library/sqlite3.html
> says:
> "...allows accessing the database using a nonstandard variant of the
> SQL..."
> But if you see SQLite website they clearly say at
> http://sqlite.org/omitted.html
> t
Ravi wrote:
> The documentation of the sqlite module
> at http://docs.python.org/library/sqlite3.html
> says:
>
> "...
> allows accessing the database
> using a nonstandard variant of the SQL..."
>
> But if you see SQLite website they clearly say
> at http://sqlite.org/omitted.html that onl
In message , Philip
Semanchuk wrote:
> On Mar 26, 2010, at 5:57 AM, Laszlo Nagy wrote:
>>
>> On my Linux system: Python version: 2.6.2 sqlite3.sqlite_version:
>> 3.6.10
>> On my Windows system: Python version: 2.6.5 sqlite3.sqlite_version:
>> 3.5.9
>>
>> Why is that?
>
> The few Linux distros th
On Mar 26, 2010, at 5:57 AM, Laszlo Nagy wrote:
Hi All,
On my Linux system: Python version: 2.6.2 sqlite3.sqlite_version:
3.6.10
On my Windows system: Python version: 2.6.5 sqlite3.sqlite_version:
3.5.9
Why is that? I wrote a program that uses SAVEPOINT/ROLLBACK to. It
is only availa
2010.03.26. 10:57 keltezéssel, Laszlo Nagy írta:
Hi All,
On my Linux system: Python version: 2.6.2 sqlite3.sqlite_version: 3.6.10
On my Windows system: Python version: 2.6.5 sqlite3.sqlite_version: 3.5.9
Why is that? I wrote a program that uses SAVEPOINT/ROLLBACK to. It is
only available in
#1. By using isolation_level = None, connection objects (used as a
context manager) WON'T automatically commit or rollback transactions.
#2. Using any isolation level, connection objects WON'T automatically
begin a transaction.
#3. Possibly, include your connection manager class code, to show h
On Fri, 2010-03-12 at 09:35 +0100, Laszlo Nagy wrote:
> > No it doesn't. The problem is that using a connection as a context
> > manager doesn't do what you think.
> >
> > It does *not* start a new transaction on __enter__ and commit it on
> > __exit__. As far as I can tell it does nothing on __
Annotating your example:
# entering this context actually does nothing
with conn:
# a transaction is magically created before this statement
conn.execute("insert into a values (1)")
# and is implicitly committed before this statement
conn.execute("SAVEPOINT sp1")
No it doesn't. The problem is that using a connection as a context
manager doesn't do what you think.
It does *not* start a new transaction on __enter__ and commit it on
__exit__. As far as I can tell it does nothing on __enter__ and calls
con.commit() or con.rollback() on exit. With isola
On Fri, 2010-03-12 at 08:32 +0100, Laszlo Nagy wrote:
> > From memory you can't issue a "CREATE TABLE" statement inside a
> > transaction, at least not at the default isolation level. Such a
> > statement will automatically commit the current transaction. Doesn't
> > help with your current proble
On Fri, 2010-03-12 at 08:48 +0100, Laszlo Nagy wrote:
> >
> > I'm now confused. Also, I could not find anything about these
> > isolation levels on the sqlite website. The only think I could find is
> > "PRAGMA read_uncommited". If that is the same as setting
> > isolation_level to None, then I
I'm now confused. Also, I could not find anything about these
isolation levels on the sqlite website. The only think I could find is
"PRAGMA read_uncommited". If that is the same as setting
isolation_level to None, then I don't want it.
Yes, it is. Here is a test:
import os
import sqlite3
From memory you can't issue a "CREATE TABLE" statement inside a
transaction, at least not at the default isolation level. Such a
statement will automatically commit the current transaction. Doesn't
help with your current problem but worth pointing out :-)
Thank you. I'll keep in mind.
Whe
On Fri, 2010-03-12 at 07:46 +0100, Laszlo Nagy wrote:
> >
> >>> import sqlite3
> >>> conn = sqlite3.connect(':memory:')
> >>> with conn:
> ... conn.execute("BEGIN")
> ... conn.execute("create table a ( i integer)")
> ... conn.execute("insert into a values (1)")
> ... conn.execute
Roger Binns schrieb:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dennis Lee Bieber wrote:
I suspect, besides building an sqlite3.dll (if Windows), you might
have to modify the pysqlite DB-API adapter to support whatever new
arguments have been added to various calls (most like the db.
On Oct 17, 12:18 pm, Roger Binns wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Dennis Lee Bieber wrote:
> > I suspect, besides building an sqlite3.dll (if Windows), you might
> > have to modify the pysqlite DB-API adapter to support whatever new
> > arguments have been added to v
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dennis Lee Bieber wrote:
> I suspect, besides building an sqlite3.dll (if Windows), you might
> have to modify the pysqlite DB-API adapter to support whatever new
> arguments have been added to various calls (most like the db.connect()
> paramete
En Mon, 05 Oct 2009 23:08:59 -0300, AggieDan04
escribió:
On Sep 17, 9:10 am, J Kenneth King wrote:
ici writes:
> I likeshelvefor saving small amounts of data, user preferences,
> recent files etc.
>http://docs.python.org/library/shelve.html
I like it too, but I hear the great powers that
On Sep 17, 9:10 am, J Kenneth King wrote:
> ici writes:
> > I likeshelvefor saving small amounts of data, user preferences,
> > recent files etc.
> >http://docs.python.org/library/shelve.html
>
> I like it too, but I hear the great powers that be are going to
> deprecate it.
If you want the conv
You can also make a SQLite database be in-memory, giving you
the performance benefits of skipping the disk.
Yes, I love the in-memory database -- especially for my automated
testing in Django. However, the OP said that memory footprint
was a concern (granted, I don't know how much data they
alex23 wrote:
> So what part of the standard library do you recommend using instead?
> Or was there no time for advice between snarkiness?
As a matter of technique, I believe in fitting the storage to the
particulars of the problem at hand.
In my own projects, I will often employ simple text base
In article ,
Tim Chase wrote:
>
>- I don't know if you're currently keeping the RTF in memory the
>whole time, or if you repeatedly reload (whether in one go, or
>streaming it) and reparse the file. This sounds memory and/or
>processor intensive. Using sqlite, the processing is done at the
TerryP wrote:
> Yeah, I'm sure that is the same kind of thinking that caused 16-bit MS-
> DOS applications to remain a part of Windows NT so long.
So what part of the standard library do you recommend using instead?
Or was there no time for advice between snarkiness?
--
http://mail.python.org/m
Gabriel Genellina wrote:
> And even after it's
> gone, being a pure Python module it's easy to keep the previous version
> around.
> So, I wouldn't worry about that.
Yeah, I'm sure that is the same kind of thinking that caused 16-bit MS-
DOS applications to remain a part of Windows NT so long.
1 - 100 of 221 matches
Mail list logo