Re: Python embebbed with Oracle SQL*Plus

From: Tom Bryan <tbryan_at_python.net>
Date: Sun, 22 Jul 2001 07:02:31 +0500
Message-ID: <9jebjm$m4l$1_at_slb6.atl.mindspring.net>


Olav wrote:

> Some time ago I did some Oracle SQL*Plus on UNIX,
> and I was able to write quite powerful scripts
> embebbed in ksh (Korn Shell).
>
> Is something similar possible with Python?

Yes, as others have stated, you can probably do something similar with sqlplus and the popen functions.

> Also I have seen that that there is a special Perl
> version for Oracle. Is there something similar for
> Python (and would it be necessary to make a special
> Python for this?).

I can recommend DCOracle. You won't need to make a special Python, but you will need to install an extension module (which may include compiling it from sources).

If you're using Jython, I've heard that you can also use Java's JDBC, but I've never tried it.  

[Quoted] > Generally, what is the best way to script Oracle with
> Python, and how does it compare to the two above?

I'd say DCOracle is the way to go. At least give it a try. http://www.zope.org/Products/DCOracle/
http://www.zope.org/Members/matt/dco2

See also
http://www.python.org/sigs/db-sig/
http://www.python.org/topics/database/

more-fun-than-a-terabyte-of-data-ly yours ---Tom Received on Sun Jul 22 2001 - 04:02:31 CEST

Original text of this message