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?
I'd like to add auto-discovery feature to my (Twisted) application and I
thought I'll use zeroconf to advertize the service to clients in local
network. I decided on zeroconf, because the app is a webservice that has to
be accessible to multitude of various clients. Unfortunately, the only one
library I found barely usable with Twisted is PyZeroconf (the other is
avahi, but it seems too tightly bound to gobject to be usable with
Twisted). Is this all or I do not know how to use google?
Anybody can share any hints on this? Is this feasible idea or there are
better ways to achieve what I want?
It would be great if you would link to the Sunklus project on your
(http://twistedmatrix.com/trac/wiki/ProjectsUsingTwisted). Sunklus is
an ad-hoc distribution file sharing daemon for Gentoo Linux. Find more
about it on our webpage, http://sunklus.googlecode.com.
Thanks for a great product!!
There are 10 types of people in this world, those
that can read binary and those that can not.
I want to point out to a project I started in my Twisted sandbox to
implement the Erlang node protocol:
vaguely inspired from the py_interface project:
What's the content? It allows you to create a hidden Erlang node as a
Twisted process, so that you can call methods on another Erlang node and
receive calls (like you can do with C or Java with standard erlang
distribution). It implements serialization and deserialization for most
of the basic types, and both direction RPC. The benefit, of course, is
to be able to get all Twisted protocols for free inside an Erlang
program, or on the contrary to access Erlang power inside a Twisted
server. I'm even writing a lit bit of documention:
I started it hoping to use it for something serious, but I couldn't, so
now the project is a bit stalled until someone really use it. I'd be
glad if it could be useful for anyone, and I'm willing to help by
debugging and adding features. You can contact me on the #twisted
channel or on this ML.
I want to deploy my Twisted app as a Twisted Application Plugin for
twistd as per
I want to distribute my app as a tarball, so the user would untar it
and run "python setup.py install". Then they would run "twistd myapp"
to start it.
How do I configure setup.py so that twisted/plugins/myapp.py is created?
Where do I create the twisted/plugins directory?
(I see how this works if I run twistd from the directory containing
twisted/plugins, or if I set PYTHONPATH, but I don't expect my users
to have to do this).
I've spent last few days trying to write a wrapper for libaio.
Libaio is a simple Linux-only library, which should in theory support
async read/write on a file descriptor. In practice - this depends on
many strange requirements and the documentation is basically
nonexistent (if you don't count lwn articles and kernel mailing list
archives), so that last few days of C coding looked like this: (it's
funny how every C coding session looks similar)
Just to summarize...
* no AIO reads from socket
* not every filesystem supported
* output buffer must be N-pages long and aligned to page start
* file access is unbuffered (yep, no cache!)
* ... and it may still - *silently* - block in some circumstances
(like, when you run out of "block layer requests", like if
I knew, what are those)
Anyways, libaio seems to be a cool idea - maybe someday kernel guys
will do some more work on it (like, commit those patches which add
buffer aio) and it will be possible to do AIO stuff on sockets. On the
other hand, I found no way other to be informed about data
availability, than periodically reaping events (want libaio and epoll
integration? use some more kernel patches...)
You can get the module code and read about current linux aio problems
It is not a general-purpose module - it's tightly tied to Twisted.
Only reads are supported ATM and there's no Python queue, only that low
level one (see TODO.txt). If you're lucky, you may even see the proof
of concept code running - w/o blocking. There are more things to come,
especially that async shutil.copyfileobj replacement... :)
Sad thing is, that Linux seems to lack much in this area, especially
when compared to FreeBSD...
PS: I feel glad I didn't started with POSIX aio_* implementation - on
Linux it is said to launch a new thread for every fd request!
http://www.atnf.csiro.au/people/rgooch/linux/docs/io-events.html - way
to go, glibc programmers! I hope things are looking better now, than
they were that few years ago...
Running the email server script from Abe Fettig's Twisted book produces the following error:
"ImportError: No module named OpenSSL"
There are a number of versions of a number of Python modules with a similar name. PyOpenSSL has not been updated since 2004 and only has a .6 version number.
Which OpenSSL module or other modules should I install with Twisted 2.5 on Linux in order to avoid this error message. I am using the CentOs 4 version of Linux which is similar to RHEL 4.