Hi, I posted earlier a question about importing python standard modules, which I solved by using the Extension directory. Now is it possible for a script in that directory to access the context object? I do have a lot of sql routines, which I would like to access from the extension script by using the context object. When I try that I do get an error global name 'context' is not defined. Which module do I have to import in order to get access to this? TIA Patrick W. Fraley -- *************************************** COMsulting Gerhard Faehling GmbH Patrick W. Fraley Oeverdieker Weg 6 23669 Timmendorfer Strand Tel: 04503 / 88 12 45 Fax: 04503 / 88 10 18 E-Mail: pf@comsulting.de Internet: www.comsulting.de ***************************************
If your Extensions use a signature of the form def myextension( self, ... ): ... self will usually have the container/context value. Check the Zope Book and the Development Guide for the rules. On 14 Jul 2003, Patrick W. Fraley wrote:
Hi,
I posted earlier a question about importing python standard modules, which I solved by using the Extension directory.
Now is it possible for a script in that directory to access the context object? I do have a lot of sql routines, which I would like to access from the extension script by using the context object. When I try that I do get an error global name 'context' is not defined. Which module do I have to import in order to get access to this?
TIA Patrick W. Fraley --
*************************************** COMsulting Gerhard Faehling GmbH Patrick W. Fraley Oeverdieker Weg 6 23669 Timmendorfer Strand Tel: 04503 / 88 12 45 Fax: 04503 / 88 10 18 E-Mail: pf@comsulting.de Internet: www.comsulting.de ***************************************
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Please consult the fine manual: <http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ScriptingZope. stx> Stefan --On Montag, 14. Juli 2003 16:19 +0200 "Patrick W. Fraley" <pf@comsulting.de> wrote:
I posted earlier a question about importing python standard modules, which I solved by using the Extension directory.
Now is it possible for a script in that directory to access the context object? I do have a lot of sql routines, which I would like to access from the extension script by using the context object. When I try that I do get an error global name 'context' is not defined. Which module do I have to import in order to get access to this?
-- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/
participants (3)
-
Dennis Allison -
Patrick W. Fraley -
Stefan H. Holek