|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hey everyone,
I am currently evaluating the use of sqlite3 to store application data from a python application that I am writing. I am using Debian Etch so some of the packages are out of date and thus I decided to compile them from source. Python 2.5.2 was fairly straightforward to compile and install. However, I have some confusion regarding sqlite. According to the sqlite website they "strongly recommend" to download the sqlite-amalgamation version. Which pretty much means all the code is contained in one C file. They provide instructions on how to compile it using gcc. But then now what...I am confused at this point. So I have a sqlite object file. How do I use it? How do I use it with python? Anybody here have any experiences regarding this issue? Thanks, Amit -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 04/03/08 02:19, Amit Uttamchandani wrote: > Hey everyone, > > I am currently evaluating the use of sqlite3 to store application > data from a python application that I am writing. > > I am using Debian Etch so some of the packages are out of date > and thus I decided to compile them from source. Python 2.5.2 was > fairly straightforward to compile and install. > > However, I have some confusion regarding sqlite. According to the > sqlite website they "strongly recommend" to download the > sqlite-amalgamation version. Which pretty much means all the code > is contained in one C file. > > They provide instructions on how to compile it using gcc. But > then now what...I am confused at this point. So I have a sqlite > object file. How do I use it? How do I use it with python? > > Anybody here have any experiences regarding this issue? I suggest that you instead backport the relevant sqlite source packages. - -- Ron Johnson, Jr. Jefferson LA USA We want... a Shrubbery!! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFH9Nx+S9HxQb37XmcRAkLVAJ9UI1AEroGLdgOD76EO5n CzWm3OxACcDRrC a1MlFbTHMQAs7Wwz6wQ643I= =67xx -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Thu, Apr 3, 2008 at 9:19 AM, Amit Uttamchandani <atu13439@csun.edu> wrote:
> Hey everyone, > > I am currently evaluating the use of sqlite3 to store application data from a python application that I am writing. > > I am using Debian Etch so some of the packages are out of date and thus I decided to compile them from source. Python 2.5.2 was fairly straightforward to compile and install. >From python >2.5 you don't need anything. sqlite is included by default (note: that has nothing to do with the userspace tools to access a databasee from the commandline) ~ $ python Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "", "copyright", "credits" or "license" for more information. >>> import sqlite3 as sqlite >>> con = sqlite.connect(':memory:') >>> c = con.cursor() >>> c.execute("""CREATE TABLE test(id INTEGER, message TEXT);""") <sqlite3.Cursor object at 0xb7d81f20> >>> c.execute("INSERT INTO test (id, message) VALUES (?, ?)", (1, "message 1")) <sqlite3.Cursor object at 0xb7d81f20> >>> c.execute("INSERT INTO test (id, message) VALUES (?, ?)", (1, "message 2")) <sqlite3.Cursor object at 0xb7d81f20> >>> c.execute("INSERT INTO test (id, message) VALUES (?, ?)", (1, "message 3")) <sqlite3.Cursor object at 0xb7d81f20> >>> result = c.execute("SELECT id, message FROM test") >>> for row in result: .... print row .... (1, u'message 1') (1, u'message 2') (1, u'message 3') >>> exit() -- http://tumblr.marcher.name https://twitter.com/MartinMarcher http://www.xing.com/profile/Martin_Marcher http://www.linkedin.com/in/martinmarcher You are not free to read this message, by doing so, you have violated my licence and are required to urinate publicly. Thank you. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Thu, 3 Apr 2008 13:16:57 +0530
"sabarish balagopal" <sabarish.balagopal@gmail.com> wrote: > I just downloaded the source tarball, un-tar'ed and unzipped, did a > "./configure && make". That left me with a "sqlite3" executable. I didn't > had slightest of problem doing this. > > So if you can elaborate what exactly you did, what exact error/problem you > faced, what is that you trying to do, I guess other users will be able to > you out. > > Cheers! > Sabarish. > Thanks for the reply sabarish. Yes, I could have downloaded the source tarball and done that but according to the website (in the download section), they recommend to download the sql-amalgamation version. Which is just all the source code into one C file. I was wondering if anyone has used this specific amalgamation version... Thanks, Amit -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Amit Uttamchandani <atu13439@csun.edu>:
> On Thu, 3 Apr 2008 13:16:57 +0530 > "sabarish balagopal" <sabarish.balagopal@gmail.com> wrote: > > > I just downloaded the source tarball, un-tar'ed and unzipped, did a > > "./configure && make". That left me with a "sqlite3" executable. I didn't > > had slightest of problem doing this. > > > > So if you can elaborate what exactly you did, what exact error/problem you > > faced, what is that you trying to do, I guess other users will be able to > > you out. > > Yes, I could have downloaded the source tarball and done that but > according to the website (in the download section), they recommend > to download the sql-amalgamation version. Which is just all the > source code into one C file. I was wondering if anyone has used > this specific amalgamation version... They may just be trying to limit their support calls. It may be that their complaints generally come from people unaware as to what to do with a tarball, so they offer the blob source as a simpler way in. Use the tarball until you find it doesn't work. -- Any technology distinguishable from magic is insufficiently advanced. (*) http://blinkynet.net/comp/uip5.html Linux Counter #80292 - - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
![]() |
| Outils de la discussion | |
|
|