Using DCOracle

Oleg Broytmann phd at phd.russ.ru
Tue May 23 15:38:42 CEST 2000


On Tue, 23 May 2000, Luca wrote:
> Where can I find a simple python script that use DCOracle?

   Take my:

from DCOracle import Connect
jwt = Connect("%s/%s@%s" % (login, password, SID))

cursor = jwt.cursor()
format = "%s | "*13 + "%s\n"

cursor.execute("SELECT * FROM sides_view")
while 1:
   olist = cursor.fetchmany(10)
   if not olist: break
   for row in olist:
      sys.stdout.write(format % row)

cursor.close()
jwt.close()

Oleg.            (All opinions are mine and not of my employer)
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list