[Zope-DB] Initializing DCOracle2 and connecting to outside script

Jim Abramson jabramson at wgen.net
Tue Oct 19 13:52:11 EDT 2004


Second question first: Zope doesn't work this way; from Zope objects
(such as Page Templates) you won't be able to reference scripts or other
things on your filesystem directly.  Based on the evidence it seems like
you ought to be looking into what "ExternalMethods" can do for you - I
recommend checking out the Zope Book for a primer (search zope.org and
you'll find links).  I don't think Cx_Oracle is going to be of any use
to you in the Zope world.

As far as your first question, one would need to know the Zope/python
versions you have installed (the python that came with Zope is the one
of interest, not any standalones you might also have installed) to give
better advice.  But something you definitely want to make sure of is
that you're running install.py with the python.exe that came with Zope
(again, not a standalone python install).  If it still doesn't work, I
would recommend posting back to this list with the above-mentioned
version info and someone might be able to give you specific advice.


> -----Original Message-----
> From: Barry Sperling [mailto:barry at angleinc.com] 
> Sent: Tuesday, October 19, 2004 10:14 AM
> To: zope-db at zope.org
> Subject: [Zope-DB] Initializing DCOracle2 and connecting to 
> outside script
> Hi All,
> 	I'm new to both Python and Zope, but I couldn't find a 
> search mechanism when I entered this list so I'll ask 2 
> questions that probably have been
> answered:
> 	1) Trying to connect with DCOracle2, the install.py 
> says it needs an older version of Python than the one in Zope 
> or the one I've downloaded and started learning with (2.3.4). 
>  Do I need to get an old Python to install DCOracle2 so that 
> Zope will be connected to my Oracle 8i database on my Win2K machine?
> 	2) I've tried to connect to a non-Zope script in Python 
> that was used to connect to Oracle using cx_Oracle.  
> Cx_Oracle works from PythonWin, but when I use the ZopeBook 
> method of connecting from a page template it doesn't know 
> what to do.  Their example of "python: 
> here.CalculateCompoundingInterest" works, but then when I put 
> in the path to a non-Zope python script it gives me a "key 
> value" error on the word "item" when I put it in front of the 
> address, or a "compilation failed" error on the "d" in the 
> drive specification without the phrase "item/" before it:
> <span tal:content="d:\python23\Scripts\test_prime.py"> </span>
> 	I wouldn't need the solution in 2) right now if I could 
> connect as in question 1).  Any help would be appreciated!
> 	Barry
> _______________________________________________
> Zope-DB mailing list
> Zope-DB at zope.org
> http://mail.zope.org/mailman/listinfo/zope-db

More information about the Zope-DB mailing list