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've implemented an epoll reactor using the level triggered mechanism.
Please check it out and let me know if there's anything I've done wrong.
This is the first time I've played with twisted reactor internals
There's a README file in the tarball with instructions on setting it up.
1. I don't understand how to use this object. When the fetch method is
called, this object is passed containing the requested messages which
you then return, right? But is there any easy way to just iterate
through it and get the requested UIDis, even if LAST is not set.
2. Where could I find some IMAP4 server examples?
I'm trying to figure out how to hook up the necessary classes in
twisted.conch.recvline to add line-editing and history to a simple ssh
app. It was easy to modify
to use a custom protocol (a simple command-line interface that sends web
services requests to a JotSpot wiki), but I can't figure out how
recvline is meant to be used. Could someone (Jp?) show me how you'd go
about bolting recvline onto sshsimpleserver?
I have a wxpython application that work with twsited 2.0 on win and
linux. In these days I'm "porting" it from twisted 1.3 to 2.0 +
threadselectreactor, but not all work well.
Into my application I use:
threads.deferToThread with some addCallBack
1) Sometime then I open and close my application I receive this error:
Unhandled exception in thread started by <bound method
Thread.__bootstrap of <Thread(Thread-1, stopped daemon)>>
Traceback (most recent call last):
File "C:\Python23\lib\threading.py", line 451, in __bootstrap
File "C:\Python23\lib\threading.py", line 460, in __stop
File "C:\Python23\lib\threading.py", line 256, in notifyAll
File "C:\Python23\lib\threading.py", line 238, in notify
currentThread() # for side-effect
TypeError: 'NoneType' object is not callable
2) Then I call with threads.deferToThread a method that make a blocking
work, and after it open a new frame, the frame is opened, but if I want
to close the first frame and the second frame (with the "X" on the
frame), the application don't close. Into the task manager (on win) or
into /proc/"pid" I see that the process (python.exe) are alive and have
three threads. I attach a simple code that reproduce this problem.
3) Why into your demo the reactor.stop() work and into my code I receive
RuntimeError: can't stop reactor that isn't running
I use the same code initialization of the demo.
Thanks a lot,
I was trying to implement a very basic ftp server using the
twisted framework (version 2).
The server is running under WinXP. I launch the programm under
the twisted shell using twistd -y name_program.py
The client is linux partly because for the test it appears
that I need a passice connection.
I manage to login and to type basic command (like help, bin)...
As soon as I ask for a ls, there is a message 550 : Cannot
accsees below / directoey : Permission denied. The directory
If it does not exist there is anyway a very different message
that pops up and the connextion is forced to close.
Obviuosly there is something that I do not get right for the
file systeme authorisation.
I have looked for examples but have not found any helping further.
I you can point me to some usefull links or information I
would greatly appreciate.
The basic code is below.
I use passice client and the connection is OK but I have a
trouble the clie
# FTp server for test
from twisted.internet.protocol import Protocol, ServerFactory
from twisted.protocols import ftp
from twisted.application import service, internet
from twisted.cred import checkers,portal
#To run under the twisted shell: twistd -y name_program.py
# definition du royaume
# Attention, il sera necessaire d'utiliser une connection
factory = ftp.FTPFactory(portal)
# definition de l'application
application = service.Application("ftp")
# definition du serveur et attache au service associe !!!
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)
I am trying the exmaple in the python docs -
Configuring and Using the Twisted.Web Server - Twisted Web Development.
it says there:
"You can also create a Site instance by hand, passing it a Resource object
which will serve as the root of the site:
from twisted.web import server, resource
from twisted.internet import reactor
isLeaf = True
def render_GET(self, request):
return "<html>Hello, world!</html>"
site = server.Site(Simple())
So I prepared a script named myhttp exactly like this and ran ./myhttp
I had made sure with netstat that indeed port 8080 was free before running
the script and after
running the script it was in a listening state.
But when pointing the Mozilla browser to http://localhost:8080 (or
I got the following error:
"Method Not Allowed
Your browser approached me (at /) with the method "GET". I only allow the
I had also made sure that there in no problem with iptables and that the
iptable service is down.
Any idea ?
Am I missing something?
Any help will be appreciated.
FREE pop-up blocking with the new MSN Toolbar - get it now!
Our experiment has need for a pseudo real-time (prompt) networked
alarm collection and display system. Before just diving in and
writing something I thought I'd best try to see if anything is out
there and Twisted certainly seems a fertile enough framework to have
had at least one such system sprouted already.
What we have is several, independent processes all of which can raise
problems of varying degrees of severity. Most of the alarm producers
are written in differing languages and frameworks and are scattered
over different computers (some in different states).
We want to centralize these alarms and then serve them to one or more
consumers. Ideally alarms are "pushed" to consumers rather than
needing to poll so as to minimize latency between production and
consumption. But, because some consumers will be behind firewalls the
consumers should initiate the connection.
Anything already fit this bill or come close? If we do end up rolling
our own, any suggestions to get us started in the right direction?