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
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?
Does anyone have some example code for building a reconnecting PB client?
This is what I have now:
from twisted.spread import pb
from twisted.internet import reactor
from twisted.python import util
events = pb.PBClientFactory()
reactor.connectTCP("localhost", 8789, events)
queue = events.getRootObject()
I am using python 2.4 on FC6, and Twisted 2.5.0. I have installed the
latest stable versions from source of Nevow, Webut, and ldaptor
(0.0.43). I tried to run the ldaptor-webui program, but encountered the
Traceback (most recent call last):
File "/usr/bin/ldaptor-webui", line 4, in ?
from ldaptor.apps.webui import main
line 5, in ?
from ldaptor.config import LDAPConfig
File "/usr/lib/python2.4/site-packages/ldaptor/config.py", line 4,
from ldaptor import interfaces
File "/usr/lib/python2.4/site-packages/ldaptor/interfaces.py", line 3,
AttributeError: 'module' object has no attribute 'Interface'
Apparently this stems from something related to Zope. The imported
module in question, <module 'twisted.python.components' from
indeed has no attribute Interface. However it does import "interface",
module <module 'zope.interface.interface' from
Is ldaptor-webui in need of updating to run with something new that
either Twisted or Zope changed?
I've recently been doing work with Twisted tests from within the Zope
testrunner. It's a real pain because if the tests or their callbacks
raise exceptions, no traceback gets given to the result object. See
The fix I've uploaded doesn't actually help me. By the time the result
object gets the failures, they've been cleaned with cleanFailure --
Failure.tb is None and everything is a string.
Is it possible to make a duck-typed traceback from a cleaned Failure?
I haven't really looked into it, but I can't think of why not off the
top of my head. Granted I ran out of thought gluons a couple of hours
I have written a highly simplified twisted web server using twisted
extending one of the demos, but I have one small problem.
I cannot see out how to arrange to have the server listen one particluar
address:port combination. The system I want to use it on has a pair of
NICs and I need the server to listen on one NIC and not the other due to
Any help would be appreciated.
I mentioned at Pycon that I wanted to use Py2exe to distribute my tac. How
would it be done? The alternate method I had been using was not using a tac
file but that was not recommended.
It was great meeting some of the Twisted folk at Pycon. Highly
Some users of a program that I'm writing have been reporting this
error that I so far have been unable to track down. It seems that it
originates from Twisted, but that it skips around my errback handler,
and provides no traceback information:
Traceback (most recent call last):
My query is made from line 121 here:
Does anyone have any insight as to where this error could be coming
from, and why it isn't getting trapped by my errback function? I
don't know yet whether this is a problem in Twisted, or if I'm doing
something incorrect in my err_cb.
I am building a basic chat program. I am using LineReceiver for the
protocol on both the server and the client. My problem is when i loop
through all the clients in my ServerFactory and choose to send data to the
client with multiple calls to transport.write(data), the client side does
not pick it up in two seperate calls, instead it is received in one
lineReceive. In the server I call transport.write() twice, the client
however receives both calls in one lineReceive instead of two lineRecieve
calls, how can I get lineReceive to be fired for each transported message?
//// CLIENT LINE RECEIVE ////
def lineReceived(self, line):
//// SERVER CONNECTION MADE ////
host = self.transport.getPeer().host + ": joined the server."
for c in self.factory.clients:
c.transport.write(host + '\n')
if self == c:
c.transport.write(self.getMOTD()) ### getMOTD just returns
some string ###