473,511 Members | 16,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about including something like sqlite in python

I was just thinking, since Python 3.0 is supposed to clean up a lot of
the unnecessary or redundant features of Python and make other things
more streamlined, does it seem to anyone that including SQLite goes
against this goal?

This is just me thinking out loud, mind you, but it seems like including
a database module (especially one that many people won't use in favor
of MySQL or PostgreSQL, etc.) is weighing down the standard library. I
suppose the sqlite module might still be removed in 3.0, but the
inclusion of it at all seems a little strange (and also sort of like an
endorsement for using it).

I can see how it would be helpful to include something like hashlib, for
example, because it streamlines the different hashing modules, and even
ElementTree, which might be seen as the standard way to work with XML.

Anyway, I'd be curious to hear other people's thoughts about this. Maybe
I'm looking at it the wrong way.
Sep 11 '06 #1
8 1171
John Salerno wrote:
This is just me thinking out loud, mind you, but it seems like including
a database module (especially one that many people won't use in favor
of MySQL or PostgreSQL, etc.) is weighing down the standard library.
Weighing down the standard library? The latest version of sqlite is only
40k SLOC while Python 2.5 incl' the standard library is well over 700k
SLOC.
Sep 11 '06 #2
John Salerno <jo******@NOSPAMgmail.comwrites:
I was just thinking, since Python 3.0 is supposed to clean up a lot
of the unnecessary or redundant features of Python and make other
things more streamlined, does it seem to anyone that including
SQLite goes against this goal?
To my mind, "unnecessary or redundant" is more on the order of
'rfc822', since its functionality is now entirely superseded by
'email'.
This is just me thinking out loud, mind you, but it seems like
including a database module (especially one that many people won't
use in favor of MySQL or PostgreSQL, etc.) is weighing down the
standard library.
Python's philosophy is also one of "batteries included". The module
adds something useful to many people that doesn't currently exist in
Python; but if it's not needed, a module that never gets imported
won't weigh down a program.

If the byte-count size of the standard library on disk is an issue for
someone, Python is probably not the right choice for them.

--
\ "My girlfriend has a queen sized bed; I have a court jester |
`\ sized bed. It's red and green and has bells on it, and the ends |
_o__) curl up." -- Steven Wright |
Ben Finney

Sep 11 '06 #3
On Mon, 11 Sep 2006 19:06:45 GMT,
John Salerno <jo******@NOSPAMgmail.comwrote:
I can see how it would be helpful to include something like hashlib,
for example, because it streamlines the different hashing modules, and
even ElementTree, which might be seen as the standard way to work with
XML.
None of my python applications works with XML. Including Elementree in
the standard library would do nothing more than weigh it down.

By that logic, about 80% of the standard library is dead weight. ;-)
Anyway, I'd be curious to hear other people's thoughts about
this. Maybe I'm looking at it the wrong way.
Seriously, though, as someone else mentioned, I think it's part of the
nature of the batteries included philosophy. It's difficult to imagine
any one developer (or development shop) using the entire library, so at
least one module must be extraneous. The same might be said of the
language itself: so far, for me, generator expressions and decorators
are also just bogging down the compiler, but that may just be me and the
way I develop the kinds of applications I develop.

Regards,
Dan

--
Dan Sommers
<http://www.tombstonezero.net/dan/>
"I wish people would die in alphabetical order." -- My wife, the genealogist
Sep 12 '06 #4
Dan Sommers wrote:
It's difficult to imagine
any one developer (or development shop) using the entire library, so at
least one module must be extraneous.
That's a good point. I guess I am just trying to figure out why I'm a
little surprised sqlite was included, but at the same time I'm excited
to use it and the fact that it will now be standard has caused me to
look into more than otherwise. :)
Sep 12 '06 #5

JohnI guess I am just trying to figure out why I'm a little surprised
Johnsqlite was included, but at the same time I'm excited to use it
Johnand the fact that it will now be standard has caused me to look
Johninto more than otherwise. :)

You might find some of the discussion on the python-dev mailing list
instructive:

http://www.google.com/search?hs=Phn&...te&btnG=Search

This thread looks particularly interesting (and rather long-lived):

http://mail.python.org/pipermail/pyt...er/049534.html

Skip
Sep 12 '06 #6

John Salerno wrote:
I was just thinking, since Python 3.0 is supposed to clean up a lot of
the unnecessary or redundant features of Python and make other things
more streamlined, does it seem to anyone that including SQLite goes
against this goal?

This is just me thinking out loud, mind you, but it seems like including
a database module (especially one that many people won't use in favor
of MySQL or PostgreSQL, etc.) is weighing down the standard library. I
suppose the sqlite module might still be removed in 3.0, but the
inclusion of it at all seems a little strange (and also sort of like an
endorsement for using it).

I can see how it would be helpful to include something like hashlib, for
example, because it streamlines the different hashing modules, and even
ElementTree, which might be seen as the standard way to work with XML.

Anyway, I'd be curious to hear other people's thoughts about this. Maybe
I'm looking at it the wrong way.
I was very pleased to learn that pysqlite will be incorporated into
Python 2.5.
Here's why.

I am developing a business/accounting app. As I am targeting the
mid-range, it must be inherently robust and scalable. Therefore I have
restricted the databases supported to two - PostgreSQL on Linux, and MS
Sql Server on Windows. (Yes I know that PostgreSQL works on Windows,
but I figure that if a company has a policy of using MS products, that
will include the database, and if not, a Linux server is a better
option.)

The downside is that there is quite a bit of setting up to do before
you can use it, and that is likely to be a deterrent for someone who
just wants to try it out.

With pysqlite incorporated, I can knock up a demo version that uses it,
and it will work straight out of the box. This is a major benefit. I
have not started looking into it yet, but it is definitely on my to-do
list.

Frank Millman

Sep 13 '06 #7
John Salerno wrote:
I was just thinking, since Python 3.0 is supposed to clean up a lot of
the unnecessary or redundant features of Python and make other things
more streamlined, does it seem to anyone that including SQLite goes
against this goal?
Not to me. I don't see the redundancy. The DB-API spec has been
around for years. I think it's great that one implementation comes
with Python.
This is just me thinking out loud, mind you, but it seems like including
a database module (especially one that many people won't use in favor
of MySQL or PostgreSQL, etc.) is weighing down the standard library. I
suppose the sqlite module might still be removed in 3.0, but the
inclusion of it at all seems a little strange (and also sort of like an
endorsement for using it).
Sure, but primarily it's endorsement for using the the DB-API.

Including SQLite lowers the barrier for getting started in writing
applications in a domain where Python fits well. A domain where
Visual Basic and tools like FoxPro have dominated. Libraries such
as datetime and decimal also goes in the same direction. One could
argue that a simple to use GUI building tool is another requisite
in this domain, but maybe a web tool kit is more appropriaet these
days...

In short I think it helps making Python into a VB-killer, or if
you prefer (yuk!) the new COBOL! ;^)
Sep 14 '06 #8
In article <9t******************@news.tufts.edu>,
John Salerno <jo******@NOSPAMgmail.comwrote:
>
I was just thinking, since Python 3.0 is supposed to clean up a lot of
the unnecessary or redundant features of Python and make other things
more streamlined, does it seem to anyone that including SQLite goes
against this goal?
Nope. You misunderstand the goals of 3.0 if you think that sqlite goes
against them.
--
Aahz (aa**@pythoncraft.com) <* http://www.pythoncraft.com/

"LL YR VWL R BLNG T S" -- www.nancybuttons.com
Sep 15 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2458
by: John Salerno | last post by:
I've been looking around and reading, and I have a few more questions about SQLite in particular, as it relates to Python. 1. What is the current module to use for sqlite? sqlite3? or is that not...
6
3219
by: Jorgen Bodde | last post by:
Hi all, I am using sqlite3 in python, and I wonder if there is a way to know if there are valid rows returned or not. For example I have a table song with one entry in it. The ID of that entry...
3
3585
by: ricardo.turpino | last post by:
Hi, I've installed Mac Python 2.5. I'm running Mac OS X 10.4.10 on a Macbook 1.83GHz. I though that the python sqlite library was installed by default as part of Mac Python 2.5, however, I...
1
1530
by: mikhail.savitsky | last post by:
Hi, Official Python distro is very stable, with release cycle of around 1 year. However, to include the new version of SQLite, which has a much shorter release cycle, one has to rebuild the main...
3
1569
by: kyosohma | last post by:
Hi, I am trying to use sqlite to create a local database for an application I am writing and I am getting some screwy results from it. Basically, I have a set of values in the database and I am...
9
2572
by: Ed Leafe | last post by:
On Apr 21, 2008, at 1:05 PM, Daniel Fetchinson wrote: Don't most binary distributions include SQLite itself? I installed 2.5.2 on a new WinXP VM, and SQLite is working fine. -- Ed Leafe
0
1387
by: Guilherme Polo | last post by:
On Tue, Jul 1, 2008 at 9:51 PM, Joe Goldthwaite <joe@goldthwaites.comwrote: You need sqlite itself (www.sqlite.org) and bindings, pysqlite 2 (http://oss.itsystementwicklung.de/trac/pysqlite/) or...
0
2560
by: Joe Goldthwaite | last post by:
Thanks Guilherme. That helped. I guess I was thinking that pysqlite would automatically come with some version of sqlite. The fact that it doesn't is what was causing me to get the strange...
20
3948
by: timotoole | last post by:
Hi all, On a (sun) webserver that I use, there is python 2.5.1 installed. I'd like to use sqlite3 with this, however sqlite3 is not installed on the webserver. If I were able to compile sqlite...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.