Well seeing a CFX written in Python, as I do it with my tool, really isn't
going to be that constructive.
class VarIn(CustomTag):
def processRequest(self, request, response):
vi = request.getAttribute("variable")
response.write("<br><p>variable is: %s</p>" % vi)
The approach that I took was to write an interfacing engine so that I didn't
have to cap a stub onto each tag. Much like the old CFX_J stuff before it
was integrated directly into ColdFusion. This allowed the Python folks to
just write their code using the CFX interfaces and not have to worry about
the sticky stuff with the Python-to-C piece.
Using the Jython library allow me to create a tag that would call python
scripts by filename and get the output results (kinda like a specialized
CFEXECUTE - but never really shelling out to the OS since the Jython
libraries are loaded into the JVM). I was able to carry that a bit further
and create a scripting block that allow for inlining python code.
rish
-----Original Message-----
From: Dave Carabetta [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 2:35 PM
To: CF-Talk
Subject: Re: CFX and Python?
On Tue, 22 Jun 2004 18:55:42 -0500, Guy Rish <[EMAIL PROTECTED]> wrote:
>
> Daniel,
>
> Yes. I've done it with both Python and Jython.
> Was this a general question of something specific to the needs of a job?
>
Guy,
Do you have any sample Python CFX code you could share? We use Python
extensively as a back-end cruncher in a couple of our apps, but we
just make cfhttp calls to the Python scripts and send the data over
the wire using WDDX (also using Zope). Is the CFX way any more
efficient or more maintainable?
Any insights are appreciated.
Regards,
Dave.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

