I don't know very much about Twisted, but I would like to know how
easy would it be to use twisted with WSGI and use it with Stackless so
that I could use Twisted's defereds but wrap them in a way so that
upon callback my tasklets resume where they had called the defereds
using stackless channels.

to make it more clear, it would be something like:

def dcall(function, paramaters):
  dcall2(function, parameters, stackless.channel())

def dcall2(function, parameters, ch):
  def callback(result): ch.send(result)
  twisted.add_callback(function, parameters, callback)
  return ch.receive()

# in my html rendering..
# do stuff
favorite_color = dcall(async_cursor_execute('select * from
favorite_colors where userid=?', userid)["favoritecolor"]
# do more stuff

know what I mean?

thanks in advance.

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to