hi there, folks:
I'd really like to release 0.7.0 but I would like it to be at least a
little bit tested before I do so. Could those of you with CVS trees check
everything out and see if it performs as advertised? Deeper bugs than
that will have to wait for the next release, but I'd at least like to know
if it works for someone other than me.
______ __ __ _____ _ _
| ____ | \_/ |_____] |_____|
|_____| |_____ | | | |
@ t w i s t e d m a t r i x . c o m
I would like to announce txZMQ, ZeroMQ bindings for Twisted. txZMQ is based
on pyzmq and requires recent ØMQ version (>=2.1).
txZMQ uses ØMQ APIs to get file descriptor that is used to signal pending
actions from ØMQ library IO thread running in separate thread. txZMQ should
be usable with any Twisted reactor.
* The socket library that acts as a concurrency framework.
* Carries messages across inproc, IPC, TCP, and multicast.
* Connect N-to-N via fanout, pubsub, pipeline, request-reply.
* Fast enough for clustered products and supercomputing.
* Asynch I/O for scalable multicore message-passing apps.
Bridging ØMQ and Twisted makes a nice match: fast simple messaging between
Twisted instances solving complex problems :)
* PyPi: http://pypi.python.org/pypi/txZMQ/
* Source code: https://github.com/smira/pyzmq
* pyzmq: http://pypi.python.org/pypi/pyzmq
* ØMQ: http://www.zeromq.org/
Qik Web Team Lead
I have an xml file in my application,
I have created an element using
Example goes like this.........
and i appeneded it by using append() method.
But how i can reflect this change to my xml file?
and one more thing is i want to create element with some other parameters....
<abc m=" " n=" ">
and i have m and n values as strings with me.
can anybody help me to create this element and write it to the existing xml file
as a child of an existing element?
Thanks in advance..
Forgot the famous last words? Access your message archive online at http://in.messenger.yahoo.com/webmessengerpromo.php
On 18 May 2004, the following message was posted to this mailinglist:
Jp Calderone exarkun at divmod.com wrote:
>Daniel Newton wrote:
> I have a simple XML-PRC server similar to the example below:
> from twisted.web import xmlrpc, server
> class Example(xmlrpc.XMLRPC):
> """An example object to be published."""
> def xmlrpc_add(self, a, b):
> """Return sum of arguments."""
> return a + b
> if __name__ == '__main__':
> from twisted.internet import reactor
> r = Example()
> reactor.listenTCP(7080, server.Site(r))
> I want to be able to get the address of the client that calls the
> method can anyone help me with this?
This solution didn't work because 'transport' isn't a property of the
I'm currently in the process of changing from a customized
SimpleXMLRPCServer to a twisted XMLRPC server solution and I need to
insert the client IP into the attributes passed to the called xmlrpc
method. Anyone who knows the answer and is willing to share the info?
I was astonished to find out that looping call period depends on the system time by default. The periodic tick can even stall for a long time, if the system time jumps backwards during program execution. It turned out that this is in fact a python problem (not providing a monotonic time, at least not for posix).
I urgently need accurate periodic call in my program and I've found the solution below that seems to be working. I kindly ask you for your comments:
- Is this monotonic_time implementation OK from python perspective?
- Is monkey patch to the reactor OK or is there any other solution more appropriate in this case (I do not want to patch each looping call, but once in the application)?
- Does this patch have any negative influence to the rest of the reactor?
- How would you implement a periodic function call in twisted application (as accurate as possible)?
- Any chance to see something implemented inside twisted and/or python, so that applications don't need this kind of tricks?
Thanks a lot for your comments.
#! /usr/bin/env python
from twisted.internet import task
from twisted.internet import reactor
# python MONOTONIC time, borrowed here
if os.name == 'posix':
CLOCK_MONOTONIC = 1 # see <linux/time.h>
_fields_ = [
librt = ctypes.CDLL('librt.so.1', use_errno=True)
clock_gettime = librt.clock_gettime
clock_gettime.argtypes = [ctypes.c_int, ctypes.POINTER(timespec)]
t = timespec()
if clock_gettime(CLOCK_MONOTONIC, ctypes.pointer(t)) != 0:
errno_ = ctypes.get_errno()
raise OSError(errno_, os.strerror(errno_))
return t.tv_sec + t.tv_nsec * 1e-9
# monkey patch the reactor
reactor.seconds = monotonic_time
# TODO: check for other platforms!!
monotonic_time = time.time
"""This function is suppose to execute once a second,
regardless of the system time."""
print 'tick', monotonic_time()
loop = task.LoopingCall(tick)
I was wondering how I could protect a Twisted server from evil clients initiating,
but never completing a TLS handshake.
connectionMade is only called when the TLS handshake has completed, right?
When doing listenSSL, is there a hook which is fired right after the TCP handshake is
complete, before the TLS handshake begins, so that I can setup a callLater/dropConnection
This is the piece I am missing, since for TCP-level protection (Syn floods etc), I can
use kernel parameters / kernel packet filtering, and for app-level protection
(I do WebSockets .. which also has a handshake) I can timeout that.
I like to do above without requiring a frontend TLS terminator / firewall ..
I'd like to upgrade bot-idnar-debian64 from Debian lenny (5.0) to
squeeze (6.0). I think this host was previously kept back to test
Python 2.4 support on Debian, but it looks like the only thing it's
doing now is building pyopenssl, and I don't think that particularly
needs to be tested on lenny. I'll probably wait a week or two, and if
nobody objects, go ahead with the upgrade the next time I remember
about the host.
I'm also looking into upgrading the buildbot version on both of my
slaves (bot-idnar-*) to 0.8.5.
mithrandi, i Ainil en-Balandor, a faer Ambar
We're using the twisted.mail.smtp.sendmail(..) function to push emails. The
options one can pass to it are fairly limited. In particular I'm looking to
specify the DSN value NOTIFY=SUCCESS in the RCPT calls. Is
this implemented elsewhere in the smtp library?
(I can see mention of it missing in 2007