[DB-SIG] DCOracle -- Need help and examples
Eric Brunson
brunson@Level3.net
Tue, 25 Jan 2000 17:06:16 -0700
--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
* Dave Cinege (dcinege@psychosis.com) [000125 23:48]:
> I'm a python novice and trying get this module going with little luck.
> Maybe it's not installed right?
> (The 2 .so's and all the .py's I put in site-packages/)
See below.
> dbc =3D oci_.Connect(user/pass)=20
You shouldn't be calling the oci_ functions directly.
orb(~)$ python
Python 1.5.2 (#1, Dec 22 1999, 14:55:37) [GCC 2.8.1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import DCOracle
>>> dbc =3D DCOracle.Connect( "prov_owner/secret" )
>>> curs =3D dbc.cursor()
>>> curs.execute( "select table_name from tabs" )
>>> curs.execute( "select table_name from tabs" )
>>> for ( name, ) in curs.fetchall():
=2E.. print name
=2E..=20
SERVICE
SERVICE_ATTRIBUTE
SHARED_DIAL_POOL
SITE
SVC_COMMENTS
SVC_ERROR_HISTORY
SVC_NET_ELEMENT
SVC_PROV_SYSTEM
SWITCH
>>>=20
That said, if you know what you're doing, you should probably be able
to call the oci_ module directly, but why?
> $ v /usr/local/lib/python1.5/site-packages/
> total 6496
> -r-xr-xr-x 1 root other 31864 Jan 25 18:12 Buffer.so
> -rw-r--r-- 1 root other 2620 Jan 25 18:05 __init__.py
> -rw-r--r-- 1 root other 3973 Jan 25 18:05 dbi.py
> -rw-r--r-- 1 root other 11965 Jan 25 18:05 ociBind.py
> -rw-r--r-- 1 root other 13813 Jan 25 18:05 ociCurs.py
> -rw-r--r-- 1 root other 11327 Jan 25 18:05 ociProc.py
> -rw-r--r-- 1 root other 2424 Jan 25 18:05 ociUtil.py
> -r-xr-xr-x 1 root other 6547188 Jan 25 18:12 oci_.so
> -rw-r--r-- 1 root other 4893 Jan 25 18:05 ocidb.py
> -rw-r--r-- 1 root other 2808 Jan 25 18:05 ocitypes.py
>=20
Finish reading the installation directions.
=46rom README.txt:
The DCOracle package is a Python package. To install it, simply
copy (or on Unix link) the 'DCOracle' directory to a directory in
your Python search path.
Then you'll be able to import DCOracle.
Hope this helps.
Sincerely,
e.
--=20
Eric Brunson * _ o * Faster and faster, =
=20
brunson@brunson.com * / //\ until the thrill of speed =
=20
brunson@level3.net \>>| * overcomes the fear of death
page-eric@level3.net \\, =20
--pWyiEgJYm5f9v55/
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (SunOS)
Comment: For info see http://www.gnupg.org
iD8DBQE4jjp3QDyMrcmL1RcRAZ/eAJ9+IUGBDodjyrhalR7oPJ0ALp38UgCgi4gg
AmAhqBijX9YZrAWcgxH5Cg0=
=zTnI
-----END PGP SIGNATURE-----
--pWyiEgJYm5f9v55/--