Re: Truly platform-independent DB access in Python?

2006-08-28 Thread Boris Dušek

Bruno Desthuilliers wrote:
> bobrik wrote:
> > Hello,
> >
> > I am using the Python DB API for access to MySQL. But it is not
> > platform-independent
>
> It is. You don't have to change your Python code according to the OS or
> CPU.
>
What I mean is that wiht platform-independent access, I should be able
to not care on which operating system is the web server accessing my
scripts where I use MySQLdb which I have to install (and therfore
platform-dependently) compile myself. The important point is that
MySQLdb is installed as an extra module. So you have to compile it
manually, but what if the OS with server accessing the site that is on
shared area changes?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Truly platform-independent DB access in Python?

2006-08-28 Thread Boris Dušek
[EMAIL PROTECTED] wrote:
> I don't think you mean "platform-independent".  I suspect you mean
> "batteries included".  Prior to the release of Python 2.5, no modules to
> access SQL databases were distributed with core Python.  Starting with 2.5,
> sqlite access will be available:
>
> >>> import sqlite3
> >>> sqlite3.__file__
> '/Users/skip/local/lib/python2.5/sqlite3/__init__.pyc'
>
> So, if what you were really asking was "what SQL databases can I access
> without installing any software other than Python?", then the answer is "No
> SQL databases were distributed with Python prior to 2.5.  Starting with
> Python 2.5, access to sqlite databases is available by default."  Python 2.5
> is due out soon (according to PEP 356, on 12 September).

Yes, you excactly got my point. The thing is that I can't rely on
Python 2.5 to be installed soon.
So the only solution for me at this moment is to use jython and from
there use Java JDBC API (sorry :-) But it would be great if the Python
DB API compliant-modules would become parts of core python quickly.
Python DB API itself is a great thing.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Truly platform-independent DB access in Python?

2006-08-28 Thread Boris Dušek

Bruno Desthuilliers wrote:

> > but what if the OS with server accessing the site that is on
> > shared area changes?
>
> And what if Python is not installed on it ?-)
>
> Seriously, do you think that hosting companies swap OS very often ?

No, I don't. But I was trying to find the best solution. :-)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Truly platform-independent DB access in Python?

2006-08-28 Thread Boris Dušek

Dennis Lee Bieber wrote:
> On 28 Aug 2006 00:01:06 -0700, "bobrik" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
> > for that platform. Do you know of any Python solution for MySQL access
> > that is 100% platform-independent?
> >
>   Subprocess module invoking the MySQL command line utilities? Of
> course, parsing the results will be painful...
> --
>   WulfraedDennis Lee Bieber   KD6MOG
>   [EMAIL PROTECTED]   [EMAIL PROTECTED]
>   HTTP://wlfraed.home.netcom.com/
>   (Bestiaria Support Staff:   [EMAIL PROTECTED])
>   HTTP://www.bestiaria.com/

Hmm, that is very interesting; and parsing won't be IMHO such a problem
if the columns will be tab-separated. Thanks for your tip!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Truly platform-independent DB access in Python?

2006-08-30 Thread Boris Dušek
[EMAIL PROTECTED] wrote:
   ...  snip  ...
> So, if what you were really asking was "what SQL databases can I access
> without installing any software other than Python?", then the answer is "No
> SQL databases were distributed with Python prior to 2.5.  Starting with
> Python 2.5, access to sqlite databases is available by default."  Python 2.5
> is due out soon (according to PEP 356, on 12 September).

So I finally decided to go with sqlite, compile the module myself for
the time being and hoping python will be upgraded to 2.5 at latest at
the same time as any potential OS (or architecture) upgrade.

-- 
http://mail.python.org/mailman/listinfo/python-list