Thomas G. Apostolou schrieb:
Αρχικό μήνυμα από  Chris Withers <[EMAIL PROTECTED]>:


Thomas Apostolou wrote:

i saw that from within a DTML Method one is able to
call a fuction of a python module in the file system.

I don't think so...


Well, you are right. I do not directly call the modules's function from
the file system.
I call an External Method that "wraps" the module's function and then i
call that External Method from my DTML Method. Here is the example:

    <dtml-in expr="GetData(sysDSN=sysDSN, usr=usr, mypass=mypass,
sTable=sTable, sFields=sFields)">
      <dtml-if sequence-even>
        <tr class="even">
      <dtml-else>
        <tr class="odd">
      </dtml-if>
      <dtml-in sequence-item>
        <td><dtml-var sequence-item> </td>
      </dtml-in>
      </tr>
    </dtml-in>


GetData is the name of the External Method i call with the parameters of
the module's function as you can see.


Dont do that. Use a Database adaptor instead - any maybe issue
the query there if you dont want the ZSQL-Resultset-wrapping.
The reason is, ZDAs take care of pooling and so on and you avoid
a per thread reconnection.

_______________________________________________
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 )

Reply via email to