[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Using Basic Zope Objects

webmaster at zope.org webmaster at zope.org
Tue Nov 11 02:59:20 EST 2003


A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/BasicObject.stx#3-45

---------------

      You can "test" a Script (Python) in the Workspace frame by
      clicking the *Test* tab from the Script's management screen.
      When you test a script, the output of the script will be
      displayed in your browser.  Script testing may require that you
      provide values for the script's *parameters* before you can view
      the results.  Click the *Test* tab of the SalesScript object,
      and you will see something like the following figure.

        % Anonymous User - Nov. 11, 2003 2:59 am:
         # Example code:

         # Import a standard function, and get the HTML request and response objects.
         from Products.PythonScripts.standard import html_quote
         request = container.REQUEST
         RESPONSE =  request.RESPONSE

         # Return a string identifying this script.
         print "This is the", script.meta_type, '"%s"' % script.getId(),
         if script.title:
             print "(%s)" % html_quote(script.title),
         print "in", container.absolute_url()
         return printed



More information about the ZDP mailing list