twisted

reactor.iterate seems to block a program with Py2exe

I'm currently using an application in python which works quite well but when I'm converting it with py2exe, the application seems to be suspended at the first "reactor.iterate" Each time I press Ctrl+C to stop the application, the error is always the same and the application seems to be bloqued on a "reactor.iterate(4)" This problem ne...

Running twistd as root, modules aren't found

I have a simple web server written in Twisted, and I'm trying to start it up daemonized with twistd. Everything works fine with reactor.run() but when I use twistd -y (as root), none of my packages which are in direct child directories get found. I'm running twistd as root, since the server runs on port 80. The manpage for twistd says: ...

What should i use for a Remote Desktop Control?

Hi everybody i'm new to stackoverflow and to python programming :-) Can somebody point me in the right direction or suggest me a good way to do this..? The software I'd like to write is a kind of "multiple remote control", it has: One Server ... whose task is to send his screen to all the clients Many Clients ... they show the Serv...

New transport and reader type in Twisted

I'm trying to add a new transport to Twisted, which will read data from a stream - either a file in a tail -f way, or from a pipe, but I have some problems with Twisted architecture. I've got the transport itself (implements ITransport) ready - it handles all file opening. I've got streaming functions/deferreds ready. How do I put it to...

A clean, lightweight alternative to Python's twisted?

A (long) while ago I wrote a web-spider that I multithreaded to enable concurrent requests to occur at the same time. That was in my Python youth, in the days before I knew about the GIL and the associated woes it creates for multithreaded code (IE, most of the time, its not really multithreaded!)... I'd like to rework this code to mak...

Proper way to implement a Direct Connect client in Twisted?

I'm working on writing a Python client for Direct Connect P2P networks. Essentially, it works by connecting to a central server, and responding to other users who are searching for files. Occasionally, another client will ask us to connect to them, and they might begin downloading a file from us. This is a direct connection to the other...

How can I ensure closing all connection in loadbalancer when something fails or hangs?

I'm trying to write a simple load-balancer. It works ok till one of servers (BalanceServer) doesn't close connection then... Client (ReverseProxy) disconnects but the connection in with BalanceServer stays open. I tried to add callback (#3) to ReverseProxy.connectionLost to close the connection with one of the servers as I do with closin...

python twisted equivalent in .Net

I am trying to write a socket server in .Net. I just read about twisted and found very interesting. Is there any equivalent library available for .Net ? ...

Python twisted: where to start

Hi, I am trying to start learning twisted for socket servers creation. I want to add some useful features (like auth, and maybe some other). Maybe someone can point me to a good tutorial which will help me to start (+ maybe some other ideas) ...

Does anyone know of a asynchronous mysql lib for python?

I've been looking into non-blocking servers for python (tornado, twisted etc) but a lot of the benefits seems to be lost if there's no non-blocking connection to the database. Does anyone know if there are any projects that take care of this? (by non-blocking a la node.js) Edit: Clarified my question ...

How do you you run a Twisted application via Python (instead of via Twisted)?

I am working my way through learning Twisted, and have stumbled across something I'm not sure I'm terribly fond of - the "Twisted Command Prompt". I am fiddling around with Twisted on my Windows machine, and tried running the "Chat" example: from twisted.protocols import basic class MyChat(basic.LineReceiver): def connectionMade(s...

Twisted ignoring data sent from MUD Clients?

I have the following code (almost an exact copy of the Chat server example listed here: import twisted.scripts.twistd from twisted.protocols import basic from twisted.internet import protocol, reactor from twisted.application import service, internet class MyChat(basic.LineReceiver): def connectionMade(self): print "Got new...

twisted threading with subprocess.Popen?

I'm trying to implement a service with Twisted that's fairly close to the "finger" tutorial found here: http://twistedmatrix.com/documents/current/core/howto/tutorial/intro.html I've got a basic.LineListener waiting for a command and then executing it, then I have a client connecting and issuing commands. Trouble is that the command som...

Why do all twisted/wokkel xmpp examples ignore the proper usage of JID in the xmpp protocol?

Okay, this isn't a question. All the examples of wokkel and twisted I have seen do not properly observe generated resources in the JID. Google talk clients built using wokkel/twisted generally break because they do not set the full JID on responses, resulting in (very hidden, low level) errors like: <message to="[email protected]" from...

implement Comet with erlang and use it for PHP application

I'm building a PHP web application and I've reached a point that I need to build a Comet server because I need to update my users' whenever a new data is available (pretty much like FB). I've spent so much time searching the web and I've come to a conclusion that the best way to build Comet server is to build it with erlang. Also I've fo...

Connecting twice with twisted - how to do that correctly?

Hi, I want to use twisted (and StarPy which is a protocol implementation for asterisk ami) to connect to an asterisk server. The application initiates a outgoing fax there. I found some hints on my problem, but I cannot find out how to handle this correctly. The first fax is sent out correctly. Problem is, if I call twisted for the ...

Reading from an SSL Socket in Twisted

I'm trying to implement an SSL client in Twisted that simply must connect to a socket and read binary data (specifically, tuples of data). I've gotten the code to a point where it seems to connect and disconnect successfully but no data is ever read from the socket. class FeedbackHandler(LineReceiver): MAX_LENGTH = 1024*1024 def c...

buildbot: connect to IRC server using SSL

How can I use buildbot's IRC bot to connect to an IRC server that wants SSL connections? ...

Streaming the result of a command back to the browser using Twisted and Comet

I'm writing an application that streams the output (by this I mean both sys.stdout and sys.stderr) of a python script excited on the server, in real time to the browser. The users on the site will be allowed to select the script to run, excite and kill their chosen script, and change some parameters, so I will need a different thread p...

creating and deploying a python chat application using twisted

i have created a chat server application using twisted framework .am running it on my local maching and now i want to go gloabal.The application is similar to omegle.com. How can i devlop on a third party commertial server so that it runs continuously. Do i need to get dedicated server for it? ...