[Zope-DB] Python Scripts and Database Connections
William Trenker
wtrenker@shaw.ca
Fri, 10 May 2002 14:03:21 -0700
--Boundary_(ID_ITzcUfu4B2YQ4Kpl6MFC1A)
Content-type: text/plain; x-avg-checked=avg-ok-32FC5DF6; charset=us-ascii;
format=flowed
Content-transfer-encoding: 7BIT
Hello,
I'm testing a Zope DA that I've put together for SQLite
(http://hwaci.com/sw/sqlite/index.html). I'm getting pretty familiar with
Zope and am quite experienced with Python. I've read the doc's but I'm
still a bit confused on one point (well, lots of points).
Is there a way to create a Zope DB Connection instance on the fly from a
Python Script? What I'd like to do is programmatically create a DB
Connection object on the fly, feed it some SQL, again on-the-fly, and then
delete the connection object.
(The reason is that I'd like to set up a script with a front-end that asks
the user for a DSN and some SQL. I don't know, in advance, what database
connection the user may wish to access. But I don't want the usual ZMI
management screens to flash up when the script is running.)
Thanks in advance,
Bill
----------
"The commandments of the LORD are right, bringing joy to the heart. The
commands of the LORD are clear, giving insight to life . . . For this is
the love of God, that we keep His commandments. And His commandments are
not burdensome." (Psalm 19:8, 1John
5:3) <http://torahteacher.com/>torahteacher.com
--Boundary_(ID_ITzcUfu4B2YQ4Kpl6MFC1A)
Content-type: text/plain; charset=us-ascii; x-avg=cert;
x-avg-checked=avg-ok-32FC5DF6
Content-transfer-encoding: 7BIT
Content-disposition: inline
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/02
--Boundary_(ID_ITzcUfu4B2YQ4Kpl6MFC1A)--