PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > [OT] sqlite-amalgamation
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

[OT] sqlite-amalgamation

Réponse
 
LinkBack Outils de la discussion
Vieux 03/04/2008, 08h30   #1
Amit Uttamchandani
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut [OT] sqlite-amalgamation

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
  Réponse avec citation
Vieux 03/04/2008, 14h40   #2
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [OT] sqlite-amalgamation

-----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
  Réponse avec citation
Vieux 03/04/2008, 14h50   #3
Martin Marcher
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [OT] sqlite-amalgamation

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
  Réponse avec citation
Vieux 03/04/2008, 16h50   #4
Amit Uttamchandani
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [OT] sqlite-amalgamation

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
  Réponse avec citation
Vieux 04/04/2008, 02h20   #5
s. keeling
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [OT] sqlite-amalgamation

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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 00h51.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13442 seconds with 13 queries