Re: [Twisted-Python] Use of 'twistd' utility with command-line arguments

2009-10-01 Thread Itamar Turner-Trauring
I came across some problem using 'twistd' utility - that I would not have expected from it. The problem is - using 'twistd' to start application that requires command-line arguments. In other words, I would expect that 'twistd' passes command-line arguments to Python application - just as

Re: [Twisted-Python] zope.interface?

2010-03-08 Thread Itamar Turner-Trauring
On Mon, 2010-03-08 at 15:36 +0100, Sven-Erik Tiberg wrote: Thanks Only to clearify: Has zope.interface any depedencies/connection with the Zope web application server primarily written in the Python programming language ( http://www.zope.org/WhatIsZope ). Note: zope web application

Re: [Twisted-Python] sniffing multicast traffic

2010-03-10 Thread Itamar Turner-Trauring
On Wed, 2010-03-10 at 10:35 +, Ben Barker wrote: I have been looking at the examples here: http://code.activestate.com/recipes/425975-simple-udp-multicast-client-server-using-twisted/ But I seem to have trouble getting them to receive anything at all. Did you do the joinGroup()? One

Re: [Twisted-Python] twisted vs wsgi

2010-03-30 Thread Itamar Turner-Trauring
On Tue, 2010-03-30 at 08:46 +0100, Chris Withers wrote: I struggled to find good narrative docs on using Twisted as a WSGI server. Where should I have been looking and have I dropped any clangers in the above? The Web in 60 seconds howto has this:

Re: [Twisted-Python] Seeking advice: Coping with heavy log file loads

2010-04-09 Thread Itamar Turner-Trauring
On Fri, 2010-04-09 at 11:49 +0200, Kees Bos wrote: I think you could try to use a custom light weight log function that just queues the log messages (FIFO) and bursts them, say every second, to the log file (e.g. in a thread to use a multicore cpu). Or: 0. Profile logging system - what

Re: [Twisted-Python] gtk2reactor: scheduling work in the immediate future without throttling gtk

2010-04-18 Thread Itamar Turner-Trauring
On Sun, 2010-04-18 at 13:11 +0200, Thomas Vander Stichele wrote: - if I do it with callLater(0, ...), again these calls get executed ASAP and throttle the main loop If this is actually affecting your UI this may mean the batch size you are processing in each call is too big. E.g. if it takes

Re: [Twisted-Python] twistd and init.d

2010-04-21 Thread Itamar Turner-Trauring
On Wed, 2010-04-21 at 15:37 +0200, Don Schoeman wrote: I still get the same results (or non-results) unfortunately. I have tried the following options: 1) Tried running twistd by giving the fully qualified path: /usr/bin/twistd. 2) Tried running the .tac file together with the -g twistd

Re: [Twisted-Python] twistd and init.d

2010-04-21 Thread Itamar Turner-Trauring
I think Itamar was suggesting that you use /bin/bash -x as your init script interpreter and examine that output. Actually, I typoed, and meant /usr/bin/strace, but that's a good idea too :) ___ Twisted-Python mailing list

Re: [Twisted-Python] OSC protocol implementation

2010-04-26 Thread Itamar Turner-Trauring
On Mon, 2010-04-26 at 15:56 +, exar...@twistedmatrix.com wrote: This is mainly a question of when someone finds it interesting enough to review the code. Personally, while I remember commenting on that ticket a couple months ago, I had to go re-read the wikipedia page to remember what

Re: [Twisted-Python] Reactor Spinning?

2010-05-04 Thread Itamar Turner-Trauring
Hey Twisted folks, I'm using the twisted.web framework for a high performance HTTP proxy server that very closely resembles the HTTP proxy server example that comes with the twisted package. Under heavy load, I occasionally run into a problem where the reactor appears to start spinning on

Re: [Twisted-Python] print unicode

2010-05-05 Thread Itamar Turner-Trauring
On Wed, 2010-05-05 at 13:45 +0200, Pet wrote: Hello! I'm using Twisted 10.0 and as usually sometime print debug infos with myunicodestr.encode('UTF-8') which are saved to logfile, but since using twisted 10 I'm getting UnicodeEncodeError: 'ascii' codec can't encode characters...

Re: [Twisted-Python] print unicode

2010-05-05 Thread Itamar Turner-Trauring
On Wed, 2010-05-05 at 16:47 +0200, Pet wrote: Now, I'm getting Exception with File /usr/local/tw10/lib/python2.5/site-packages/Twisted-10.0.0-py2.5-linux-x86_64.egg/twisted/python/log.py, line 555, in write d = (self.buf + data).split('\n')

Re: [Twisted-Python] Reactor Spinning?

2010-05-05 Thread Itamar Turner-Trauring
I've confirmed that when spinning the FD corresponds with a client connection. What would you suggest logging that might provide some insight? What is the transport's writeSomeData() method doing? Is it actually trying to write an empty string? Transition from/to writeable state may also be

Re: [Twisted-Python] can the reactor be told to stop processing events and to just queue them?

2010-05-27 Thread Itamar Turner-Trauring
On Thu, 2010-05-27 at 14:08 +0200, Gabriel Rossetti wrote: is there a way to tell the reactor to just queue the events and not to process them for a specific protocol? No, Twisted doesn't have an event queue (but see below). I have two protocols running on my reactor, one that monitors

Re: [Twisted-Python] Question

2010-05-28 Thread Itamar Turner-Trauring
Is it acceptable to post job openings to this list? Yes, as long as they're Twisted-related. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Integrating Twisted with ZeroMQ

2010-06-06 Thread Itamar Turner-Trauring
On Mon, 2010-06-07 at 01:39 +0200, Laurens Van Houtven wrote: Whoops, something ate half my sentence. My point was that most of the argument still stands, I think: just listenZMQ and connectZMQ get replaced by ZMQ Endpoints :) 1. SSL runs on top of TCP, yet Twisted has connectSSL/listenSSL

Re: [Twisted-Python] Integrating Twisted with ZeroMQ

2010-06-06 Thread Itamar Turner-Trauring
On Sun, 2010-06-06 at 21:59 +0200, Laurens Van Houtven wrote: pyzmq offers something called select, which works just like select except it works on both file descriptors and ZeroMQ Sockets. It just delegates all of the work to libzmq. We could use ThreadedSelectReactor and have it use ZMQ's

Re: [Twisted-Python] Integrating Twisted with ZeroMQ

2010-06-07 Thread Itamar Turner-Trauring
On Sun, 2010-06-06 at 23:07 -0400, Itamar Turner-Trauring wrote: So, sounds like you want to define: A) A way to hook up ZeroMQ event loop with Twisted event loop so that both ZeroMQ and Twisted code can co-exist in same thread. JP's proposal is superior to this... but may require changes

Re: [Twisted-Python] handling SIGCHLD

2010-06-08 Thread Itamar Turner-Trauring
Hi, I have a twisted service that needs to fork child processes to do tasks, after which they will exit. I wrote a signal handler for SIGCHLD but it didn't seem to be called. I read something about twisted installing its own signal handlers that may conflict. Is this true? How would you

Re: [Twisted-Python] twisted.web questions

2010-06-14 Thread Itamar Turner-Trauring
On Mon, 2010-06-14 at 08:22 -0500, Allen Bierbaum wrote: 1) Is there any method to stream a large request (ex: PUT or POST with file upload) into the system or does the entire body have to be loaded into memory as part of the request? Very large requests get written to disk, rather than

Re: [Twisted-Python] twisted.web questions

2010-06-14 Thread Itamar Turner-Trauring
On Mon, 2010-06-14 at 09:38 -0400, Itamar Turner-Trauring wrote: 4) Are their any wrappers people have developed to make it a bit easier to use deferreds (in particular inlinecallbacks) in the handlers for twisted.web? (I am considering just writing a wrapper myself that provides

Re: [Twisted-Python] twisted.web questions

2010-06-14 Thread Itamar Turner-Trauring
Very large requests get written to disk, rather than memory. This is still not ideal, streaming is obviously better - someone may be able to suggest how to do it until Twisted gets fixed. That is unfortunate. Do you know of an example that shows to get access to that file or does it just

Re: [Twisted-Python] twisted.web questions

2010-06-14 Thread Itamar Turner-Trauring
On Mon, 2010-06-14 at 21:59 +0300, Yaroslav Fedevych wrote: On Mon, Jun 14, 2010 at 6:56 PM, Itamar Turner-Trauring ita...@itamarst.org wrote: Very large requests get written to disk, rather than memory. This is still not ideal, streaming is obviously better - someone may be able

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Itamar Turner-Trauring
It sounds good, but if I don't call reactor.run() after connectSSL doesn't happens anything... If I call reactor.run() after connectSSL, it works properly... There are two types of client connections: 1. Connections you open when you first run the program. Call these before reactor.run() is

Re: [Twisted-Python] Reassigned tickets

2010-06-19 Thread Itamar Turner-Trauring
On Sat, 2010-06-19 at 22:35 -0400, Itamar Turner-Trauring wrote: You could then know not to start coding on anything still in discussion state that where you feel someone should make decision. Or in actual English: You would then know not to start coding on anything still in discussion state

Re: [Twisted-Python] reactor.spawnProcess() and file descriptors

2010-06-28 Thread Itamar Turner-Trauring
On Mon, 2010-06-28 at 12:52 +0100, Carlos Valiente wrote: Hi! Is there any way of telling reactor.spawnProcess() not to close all open file descriptors? My Unix knowledge is weak, but - couldn't you pass in duplicate fds, so that when they are closed it wouldn't affect the originals?

Re: [Twisted-Python] Creating a COM object in a thread

2010-06-28 Thread Itamar Turner-Trauring
On Mon, 2010-06-28 at 17:43 -0700, Don Dwiggins wrote: What this probably means in practice is that twisted needs to use a reactor which calls MsgWaitForMultipleObjects() and runs a message loop when the function detects a new message is in the queue. I'm not sure if there is an existing

Re: [Twisted-Python] Twisted HTTP client supporting failover for multiple A records?

2010-07-15 Thread Itamar Turner-Trauring
On Thu, 2010-07-15 at 10:46 +0100, Reza Lotun wrote: I believe since all TCP connections are mediated via connectTCP hostnames are ultimately resolved via socket.gethostbyname. Twisted uses a thread pool to do DNS lookups by default, so this shouldn't block anything.

Re: [Twisted-Python] Twisted HTTP client supporting failover for multiple A records?

2010-07-15 Thread Itamar Turner-Trauring
On Thu, 2010-07-15 at 10:46 +0100, Reza Lotun wrote: As for connecting to hosts that resolve to multiple A records - I presume as a means of load balancing via DNS round robin - I'm not quite sure this is natively supported in Twisted. I believe since all TCP connections are mediated via

Re: [Twisted-Python] Twisted HTTP client supporting failover for multiple A records?

2010-07-15 Thread Itamar Turner-Trauring
On Thu, 2010-07-15 at 13:33 +0100, Luke Marsden wrote: Thanks Itamar, this is massively useful. I'll try subclassing twisted.web.client.Agent to do its own DNS lookups with twisted.names so as to be aware of the full list of A records returned. It would then attempt all the IP addresses in

Re: [Twisted-Python] How to make a 'router'

2010-07-25 Thread Itamar Turner-Trauring
On Sun, 2010-07-25 at 19:37 +0700, Didiet Noor wrote: Dear All, I am new in twisted framework, and currently building a twisted app that will route a packet from one client to multiple servers via TCP connection, back and forth. The program will work like this

Re: [Twisted-Python] What is the minimum effort solution to make inetd-managed twisted-based application?

2010-07-28 Thread Itamar Turner-Trauring
On Wed, 2010-07-28 at 15:14 +0400, twisted-...@udmvt.ru wrote: After all, I'm posting my angry code. The first file is a module with some classes, that can be used to accomplish my task. The second file is a UNIX program, it uses socketpair() and then fork() to start both client and server,

Re: [Twisted-Python] Is that behavior of t.i.stdio.StandardIO known?

2010-07-29 Thread Itamar Turner-Trauring
On Thu, 2010-07-29 at 11:23 +0400, Alexey wrote: The same happens if you redirect output to a pipe (no matter if it a named FIFO or an anonymous pipe). But if you redirect output to a file or to a /dev/null, this happens: $ ./program.py /dev/null a short pause, no input o:

Re: [Twisted-Python] Asynchronous gzipped content decompression: best approach

2010-07-30 Thread Itamar Turner-Trauring
On Fri, 2010-07-30 at 11:28 +0100, Michele - wrote: Hi, I have written a small utility function to replace twisted.web.client.getPage, to be able to read the response header. I have to say that the ever improving documentation made it quite easy for me to do it using the new

Re: [Twisted-Python] xmlrpc protocoll instanze per connection?

2010-08-04 Thread Itamar Turner-Trauring
On Wed, 2010-08-04 at 12:00 +0200, Pet wrote: Now, for XMLRPC this looks for me like Protocol instance is reused for all connection. If it is so, can I change this behavior, so I have one instance of Protocol per connection? XMLRPC is a Resource, not a Protocol: Resources handle HTTP

Re: [Twisted-Python] xmlrpc protocoll instanze per connection?

2010-08-04 Thread Itamar Turner-Trauring
On Wed, 2010-08-04 at 14:59 +0200, Pet wrote: That make sense, thanks. Is there a way to isolate requests from each other? Each call to Resource.render() (which in this case then calls XMLRPC.xmlrpc_yourmethod) is a separate request. ___

Re: [Twisted-Python] Twisted ORM

2010-08-06 Thread Itamar Turner-Trauring
I've just finished creating a basic Object Relational Mapper (ORM) in Twisted (http://trac.butterfat.net/public/twistar) called Twistar. The goal of the project is most certainly not to duplicate the full functionality of existing Python ORM's, but rather to provide a simple interface to

Re: [Twisted-Python] global exception handler

2010-08-12 Thread Itamar Turner-Trauring
On Thu, 2010-08-12 at 14:26 +0200, Zoran Bosnjak wrote: Hello all, is there a possibility to have a global (application wide) exception handler in twisted application? I would like to stop application in case of any unhandled error in deferred callbacks. Why not add an error handler yourself

Re: [Twisted-Python] Add custom options handling to a twisted application running from twistd

2010-08-18 Thread Itamar Turner-Trauring
On Wed, 2010-08-18 at 20:28 +0900, David Cournapeau wrote: I am trying to add some options handling to an existing twisted application, which runs as an app from twistd through the -y argument. It is not clear to me how to do that ? Instead of using a .tac file, write a twistd plugin:

Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Itamar Turner-Trauring
On Tue, 2010-08-24 at 11:40 +0200, Gabriel Rossetti wrote: Hello, I can't find any examples of using Twisted with wxPython, were wx is in a seperate thread. I used to have one somewhere but can' t find it either. I'm looking because for some reason my code doesn't work (the GUI freezes),

Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Itamar Turner-Trauring
On Tue, 2010-08-24 at 15:22 +0200, Gabriel Rossetti wrote: Ok, so you put Twisted in a thread? I read in several posts that this posed problems, have you had any drawbacks? reactor.spawnProcess won't notice processes have exited on posix platforms (though you can fix this by installing your

Re: [Twisted-Python] git clone with spawnProcess() can prevent socket data flow, any clue why?

2010-08-28 Thread Itamar Turner-Trauring
On Sat, 2010-08-28 at 11:31 +0200, Martin Nordholts wrote: I'll see if I can pinpoint the bug... If you can reproduce this with a Python program you launch, rather than git, that would be ideal. I assume you've tested this by running git without twisted, on the command-line, just to make sure

Re: [Twisted-Python] git clone with spawnProcess() can prevent socket data flow, any clue why?

2010-08-29 Thread Itamar Turner-Trauring
On Sun, 2010-08-29 at 08:55 +0100, Carlos Valiente wrote: Does 'tcpdump' show any git activity when you run your program, Martin? Once I had a problem like yours, and in my case it was caused by git not using the HTTP proxy within my company's LAN. I notice the original code doesn't pass

Re: [Twisted-Python] timeout in agent

2010-08-30 Thread Itamar Turner-Trauring
On Mon, 2010-08-30 at 10:54 +0200, Pet wrote: Hello! I have modified Agent.request method (twisted.web.client.Agent) to pass timeout parameter to d = cc.connectTCP(host, port, timeout=timeout) but it looks like timeout is ignored (cbConnected is called). Is this known issue? Are you

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Itamar Turner-Trauring
On Tue, 2010-08-31 at 15:17 -0600, Jason J. W. Williams wrote: Is anyone doing read/write splitting with adbapi? Looking for advice if anyone has tackled this before. Thank you in advance. What is read/write splitting? ___ Twisted-Python mailing

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Itamar Turner-Trauring
On Tue, 2010-08-31 at 20:36 -0600, Jason J. W. Williams wrote: Sending writes (e.g. INSERTs and UPDATEs) to a master MySQL server and reads (SELECTs) to a slave. So... two adbapi.ConnectionPool instances, one for the server, one for the slave? ___

Re: [Twisted-Python] Twisted and SOAP

2010-09-01 Thread Itamar Turner-Trauring
On Wed, 2010-09-01 at 07:16 +0200, Einar S. Idsø wrote: Well, at least I've found that the interest in SOAP in the Twisted community is not very great ;) And understandably so. Unfortunately, however, sometimes Twisted apps do need to talk to alternative protocols, so it is a pity there's no

Re: [Twisted-Python] Ldaptor: [PATCH] Reroute errback to deferred returned by search()

2010-09-01 Thread Itamar Turner-Trauring
On Wed, 2010-09-01 at 14:52 +0300, Anton Gyllenberg wrote: Any comments and suggestions welcome! Unit tests are always a good idea :) ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-09-01 Thread Itamar Turner-Trauring
On Tue, 2010-08-31 at 20:54 -0600, Jason J. W. Williams wrote: That's one way of handling it. Another way is to wrap the library so it does the splitting automatically. The advantage to the latter is not making mistakes where you accidentally use the READ connection for a write. That sounds

Re: [Twisted-Python] how to implement sleep?

2010-09-19 Thread Itamar Turner-Trauring
On Sun, 2010-09-19 at 22:41 +1000, Andrew Bennetts wrote: ruslan usifov wrote: Hello Twisted is great, but how cant i emulate sleep behaviour in syested. I http://twistedmatrix.com/documents/10.1.0/api/twisted.internet.task.deferLater.html Specifically, deferLater is a wrapper

Re: [Twisted-Python] Python 3

2010-09-21 Thread Itamar Turner-Trauring
I found it hard to tell what the level of support is for Python 3 - particularly on 64 bit Windows 7. I found some tickets in trac, but othewise no clear statement. Is Twisted 10.x OK on Python 3? No. Supporting Python 3 takes a large amount of effort which, as a mostly volunteer driven

Re: [Twisted-Python] patch for TLS

2010-10-07 Thread Itamar Turner-Trauring
(cc to both twisted and sage-devel lists) Hi all, In the Sage project (http://sagemath.org), we apply a patch to the Twisted version we distribute. I'd like to clean out our custom patches and push them upstream, if possible. So I have a couple of questions (I'm not terribly familiar

Re: [Twisted-Python] Getting a list of services and/or plugins are currently running

2010-10-18 Thread Itamar Turner-Trauring
On Mon, 2010-10-18 at 22:28 +0200, Johann Borck wrote: If I wanted to implement this, I'd start with a central service, that offers an interface for (twisted) apps/clients/servers to register themselves on startup. All participating plugins and services would of course have to know about that

Re: [Twisted-Python] Don't Thread On Me t-shirt proposal

2010-10-21 Thread Itamar Turner-Trauring
On Thu, 2010-10-21 at 21:36 +1100, Tim Allen wrote: A Google Image Search for DONT TREAD ON ME shows that both with-apostrophe and without-apostrophe variants are common, but the ones without seem more... authentic somehow. Indeed: http://www.flickr.com/photos/pargon/4468906943/

Re: [Twisted-Python] connectionLost never reached after calling loseConnection: stuck in CLOSE_WAIT forever

2010-10-30 Thread Itamar Turner-Trauring
On Sat, 2010-10-30 at 18:48 +0200, Stefano Debenedetti wrote: Hello Jean-Paul, thanks for tracking this down, you rock! I promise that when I'll have payed all by debts I'll buy one of those posters of Exarkun to hang on my wall! You can also get figurines:

Re: [Twisted-Python] Immediate removal of cfreactor

2010-11-01 Thread Itamar Turner-Trauring
On Sun, 2010-10-31 at 00:51 +, exar...@twistedmatrix.com wrote: Hello all, As reported in http://twistedmatrix.com/trac/ticket/4652, some problems have arisen with cfreactor. First, recent versions of Pyrex reject the Pyrex source for the support modules. This makes future

Re: [Twisted-Python] Twisted with callInThread

2010-11-02 Thread Itamar Turner-Trauring
I have an app which I want to connect in and run a app that continually spits out data to stdout. Right now my app works but the issue is when the client exits the socket connection the /usr/bin/app still continues to run. The more socket connections made the more this app is still running.

Re: [Twisted-Python] twisted daemonize problem

2010-11-08 Thread Itamar Turner-Trauring
On Mon, 2010-11-08 at 08:53 -0500, Neal Becker wrote: I try to daemonize twisted, but it uses 100% cpu. The problem occurs in this code: Why not use twistd, which does all this for you already? E.g. http://twistedmatrix.com/documents/10.1.0/core/howto/application.html or the more

Re: [Twisted-Python] wxReactor Issues

2010-11-14 Thread Itamar Turner-Trauring
On Sun, 2010-11-14 at 05:29 +, exar...@twistedmatrix.com wrote: On 03:56 am, rsga...@inbox.com wrote: Hello, My Twisted Python application with wxReactor crashes every time the user exits the application. What do you mean when you say crashes? A SIGSEGV is probably due to a bug in

Re: [Twisted-Python] ProcessProtocol stdin/stdout loop

2010-11-14 Thread Itamar Turner-Trauring
On Sun, 2010-11-14 at 16:07 +0100, Dominic van Berkel wrote: Hi all, It appears that I have managed to loop a ProcessProtocol subclass's transport.write() right back into its outReceived. It's not directly called, which leads me to believe that somehow stdin and stdout got tied up. Can

Re: [Twisted-Python] wxReactor Issues

2010-11-14 Thread Itamar Turner-Trauring
On Sun, 2010-11-14 at 09:28 -0800, RSGames Support wrote: Hi, Well, I close the application (by clicking the X). Then a few seconds later, Ubuntu comes up with a dialog asking me if I want to force quit the application. gdb reports the following when I force quit: Program terminated with

Re: [Twisted-Python] wxReactor Issues

2010-11-15 Thread Itamar Turner-Trauring
On Mon, 2010-11-15 at 19:28 -0800, RSGames Support wrote: Hi, I have created a simple demo (one .py file) to show the problem without the entire application. You can download it here: http://bit.ly/a2TTlT And, if you switch reactor.stop() with reactor.callFromThread(reactor.stop) you still

Re: [Twisted-Python] sample unit testing for xml-rpc's

2010-11-16 Thread Itamar Turner-Trauring
On Tue, 2010-11-16 at 17:29 +0530, anusha k wrote: Can anyone provide info regarding this or sample unit test-case how to test that. http://twistedmatrix.com/trac/browser/trunk/twisted/web/test/test_xmlrpc.py may provide some useful examples. ___

Re: [Twisted-Python] wxReactor Issues

2010-11-16 Thread Itamar Turner-Trauring
On Tue, 2010-11-16 at 16:29 -0800, RSGames Support wrote: Hi, I have found something interesting. When I do not call sys.exit(), and just call this: reactor.callFromThread(reactor.stop), the program exits properly. I was wondering if it was safe to not call sys.exit()? If so I think the

Re: [Twisted-Python] multicast

2010-12-15 Thread Itamar Turner-Trauring
On Wed, 2010-12-15 at 18:07 +0200, Pandelis Theodosiou wrote: I'm trying to make a Multicast client. I've tried the simple script found in: http://twistedmatrix.com/documents/10.1.0/core/howto/udp.html#auto3 While it shows no errors, it doesn't receive any data. How can I check what the

Re: [Twisted-Python] multicast

2010-12-16 Thread Itamar Turner-Trauring
On Thu, 2010-12-16 at 12:09 +0200, Pandelis Theodosiou wrote: I've also tried to use listenMulticast instead of listenUDP but then I realized this is if I need more than one application to listen/write to the multicast port and I don't need that. pandelis You should use listenMulticast

Re: [Twisted-Python] Twisted Names - strange RuntimeError

2011-01-09 Thread Itamar Turner-Trauring
On Sun, 2011-01-09 at 12:10 +0100, Angelo Dell'Aera wrote: Hi, while developing a code based on Twisted Names I'm finding myself catching RuntimeErrors like the one reported below. It seems like someone, somewhere is doing a startWriting() (or pauseProducing) on the Port object, i.e. the

Re: [Twisted-Python] client connecting to 2 servers (non simultaneously)

2011-01-11 Thread Itamar Turner-Trauring
On Tue, 2011-01-11 at 11:17 +0100, benjamin.bertr...@lfv.se wrote: Any comments is welcome. It's probably better to use one factory per client connection - easier to distinguish between connections. Not strictly necessary, though. ___ Twisted-Python

Re: [Twisted-Python] A Python enum library with a Twist

2011-01-31 Thread Itamar Turner-Trauring
On Mon, 2011-01-31 at 12:31 +0200, Jonathan Jacobs wrote: The current code is hosted on Launchpad [2] and the source code is viewable on the web [3]. One comment unrelated to the actual code: we prefer people don't prefix their projects with twisted, to prevent confusion. The suggested prefix

Re: [Twisted-Python] transport.write(a + b) versus [transport.write(a); transport.write(b)]

2011-02-16 Thread Itamar Turner-Trauring
On Wed, 2011-02-16 at 12:00 +, Carlos Valiente wrote: From twisted.protocols.basic.IntNStringReceiver.sendString(): def sendString(self, string): self.transport.write( struct.pack(self.structFormat, len(string)) + string) Would it make sense to do something like this

[Twisted-Python] Looking for intern (and full time developers)

2011-02-17 Thread Itamar Turner-Trauring
Hi everyone, My group at ITA Software, Availability and Inventory Control, is looking for an intern. Inventory Control in this context is a core part of an airline's reservation system, and we are currently hard at work developing for American Airlines:

Re: [Twisted-Python] Agent and Cannot assign requested address

2011-03-04 Thread Itamar Turner-Trauring
On Thu, 2011-03-03 at 21:00 -0700, Jason J. W. Williams wrote: Hi All, I've got a situation where I'm using t.w.c.Agent to make 100,000 POST request against a server. Each time a new Agent instance is built and the request is sent using it. After about 20,000 requests, I get this error:

[Twisted-Python] ANN: Fusion v0.3, a C++ integration layer for Twisted

2011-03-04 Thread Itamar Turner-Trauring
Fusion allows you to implement protocols for TCP and UDP in C++, minimizing data copying and function call overhead. Most people should just stick to Python, of course :) Note that I have no code that uses this version of Fusion, and unit tests (while next on my very theoretical todo list) do not

Re: [Twisted-Python] Agent and Cannot assign requested address

2011-03-04 Thread Itamar Turner-Trauring
On Fri, 2011-03-04 at 13:33 +, exar...@twistedmatrix.com wrote: It's worse than just in parallel. After the connection closes, it moves to TIME_WAIT for two minutes. These count towards the limit as well. Oh right: http://twistedmatrix.com/trac/ticket/1288 You could probably set that

Re: [Twisted-Python] Fwd: Slow data transfer with Twisted + socat + Windows

2011-03-09 Thread Itamar Turner-Trauring
On Wed, 2011-03-09 at 16:06 +0800, Jason Heeris wrote: Is this worth filing a bug about (since I have a neat little demo script to illustrate the problem), or is it just too vague? It's worth filing a bug, yes. ___ Twisted-Python mailing list

Re: [Twisted-Python] [Twisted-commits] r31216 - skip glib and gtk reactors in the new test

2011-03-17 Thread Itamar Turner-Trauring
On Wed, 2011-03-16 at 20:55 -0600, pa...@wolfwood.twistedmatrix.com wrote: + +skippedReactors = [Glib2Reactor, Gtk2Reactor] +reactorClassName = reactor.__class__.__name__ +if reactorClassName in skippedReactors and platform.isWindows(): +raise SkipTest( +

Re: [Twisted-Python] Gtk2Reactor: what are the reasons for avoiding GLib functions?

2011-04-05 Thread Itamar Turner-Trauring
On Tue, 2011-04-05 at 15:08 +0800, Jason Heeris wrote: I'd like to try and get to the bottom of the various problems with Twisted + GTK + Windows (mainly issue #4932[1], but see also issues #4376[2], #4862[3], #1759[4]). Thanks for looking into this! On issue #4376 there's a comment from

Re: [Twisted-Python] Instrumenting Reactors

2011-04-06 Thread Itamar Turner-Trauring
On Wed, 2011-04-06 at 10:55 +0100, Paul Thomas wrote: I have a reactor which is getting busier over time and I'd like to find out where the cycles are going. Using the profiler isn't really practical on a server running for days, so I'd like to instrument the reactor to show me which I/O

Re: [Twisted-Python] Running twistd with a compiled file

2011-04-21 Thread Itamar Turner-Trauring
On Thu, 2011-04-21 at 09:27 +0200, Albert Brandl wrote: Of course, it's possible to move most of the logic to other (compiled) files, but I'd prefer if the application itself could also be deployed in compiled form. The .tac file (or application.py) should typically be two lines of code, just

Re: [Twisted-Python] 100% CPU on high opened descriptors

2011-05-10 Thread Itamar Turner-Trauring
Still having problems... I can see that twistd process has a higher number than 1024 looking at /proc/pid/limits but whe 1024 descriptors number gets reached the system becomes unstable. It also has been launche using '-r epoll' option. Any other idea? 0. What does unstable mean? 1. There

Re: [Twisted-Python] a problem about iocp and callInThread

2011-05-15 Thread Itamar Turner-Trauring
I want to know what makes callInThread so special with iocpreactor? You're calling a reactor method from a thread; that is a bug, the reactor is not thread safe. As a result, different reactors may fail differently. Use reactor.callFromThread to call reactor methods from a thread.

Re: [Twisted-Python] Information on new endpoints API?

2011-06-12 Thread Itamar Turner-Trauring
On Sun, 2011-06-12 at 15:48 +0300, Orestis Markou wrote: Hello, I'm curious about the endpoints API that appeared. I've read the documentation, and I think I understand what it does, but I'm curious to see what parts of twisted it replaces. A lot of the documentation on-site is not updated

Re: [Twisted-Python] twisted.cred implementation for LDAP, anyone?

2011-06-17 Thread Itamar Turner-Trauring
On Fri, 2011-06-17 at 13:47 +0200, Ilja Livenson wrote: Oh, great, thanks! Saw the project but didn't notice they have checker as well. Also note that unless it has been updated, there's a minor incompatibility with modern Twisted (something about using twisted.python.components instead of

Re: [Twisted-Python] Handling application initialization synchronously

2011-06-20 Thread Itamar Turner-Trauring
On Mon, 2011-06-20 at 16:00 +0900, David wrote: Hi, I was wondering what's the recommended way to initialize a complex twisted application. Typically, let's say I have an application which needs to create a couple of heavy objects, each of which may create mysql db/tables: You

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-01 Thread Itamar Turner-Trauring
On Fri, 2011-07-01 at 12:29 +0200, Laurens Van Houtven wrote: Unless someone is going to go all NO GITHUB IS TERRIBLE AND YOU ARE A BAD PERSON FOR EVEN SUGGESTING IT on me, maybe we can talk about planning the transition? :) Unless I'm mistaken, Github is a proprietary system, which means I'm

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-01 Thread Itamar Turner-Trauring
On Fri, 2011-07-01 at 15:23 +0200, Laurens Van Houtven wrote: Well, part of the hypothesis of the effects of moving to Github is that a) the clear separation between core contributor and random contributor because a bit more subtle, b) it becomes easier for external contributors to

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-01 Thread Itamar Turner-Trauring
This, I believe, is the real problem -- tickets which were reviewed but never closed: http://twistedmatrix.com/trac/report/16 That is a very sad list. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

Re: [Twisted-Python] Conch Testing server and client

2011-07-01 Thread Itamar Turner-Trauring
On Fri, 2011-07-01 at 19:11 +0530, Anshul Singhle wrote: def test_1(self): def got_data(data): self.assertEquals(data,a) d = protocol.ClientCreator(reactor, SimpleTransport).connectTCP('localhost', self.server.getHost().port)

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-01 Thread Itamar Turner-Trauring
Well, that logic is a bit flawed though: you're kind of saying that we shouldn't use a better tool because it may bring us more contributors than we can handle. At the end of the day, we would still use a better tool though. No, I'm saying that given limited resources, addressing the giant

[Twisted-Python] SURVEY: Have you submitted a patch to Twisted and it never got in?

2011-07-01 Thread Itamar Turner-Trauring
In order to have at least some anecdotal evidence -- If you've submitted a patch to Twisted (or started a branch) and it never made it in, how did that happen? I imagine reasons might include a review request to write tests, redesign requests, getting distracted, it works for me, design

Re: [Twisted-Python] SURVEY: Have you submitted a patch to Twisted and it never got in?

2011-07-01 Thread Itamar Turner-Trauring
It would be far simpler to setup my DVCS to track JP's remote copy of my ticket's branch...then simply pull from that remote...make my changes and request he pull from me when he's ready to review. Automates the whole process quite a bit and reduces the round trip yak shaving. Any reason you

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-01 Thread Itamar Turner-Trauring
Twisted has a very polite club-like culture where some are on the inside, most aren't and it's clear where on that line anyone is. Submitting to the pain of the current submission tools almost seems viewed as a kind of worthwhile hazing to weed out the unworthy. A lot of the resistance to

Re: [Twisted-Python] Ways to register stuff only done for backwards compatibility

2011-07-05 Thread Itamar Turner-Trauring
On Tue, 2011-07-05 at 14:32 +0200, Laurens Van Houtven wrote: In doing twisted.positioning I find my self writing a bunch of code in ways I would ordinarily write it differently, because we have to support 2.4 still (when is that going away? Isn't the most recent RHEL 2.6 already?). The plan

Re: [Twisted-Python] SURVEY: Have you submitted a patch to Twisted and it never got in?

2011-07-06 Thread Itamar Turner-Trauring
On Wed, 2011-07-06 at 13:10 +0200, Johan Rydberg wrote: I was mostly thinking about the persistent connection functionality for twisted.web.client.Agent. We definitely want this to get in, this was a large part of the motivation for Agent in the first place. Maybe Twisted would benefit more

[Twisted-Python] Re-entrancy policy for the reactor

2011-07-24 Thread Itamar Turner-Trauring
I'm going to merge #5063 next time I have a few minutes when I'm more awake, which will mean my yak stack[1] is empty and I can go back to working on abortConnection(). As explained in http://twistedmatrix.com/trac/ticket/78, abortConnection() is like loseConnection(), except it doesn't wait

[Twisted-Python] Do you use producers with SSL or TLS?

2011-07-25 Thread Itamar Turner-Trauring
If so, I'd appreciate if if you could test your application against trunk Twisted (make sure you have a recent version of pyOpenSSL). I just landed some fixes to the new TLS implementation's producer code, and catching any problems before we release 11.1 would be good. Thanks!

Re: [Twisted-Python] Re-entrancy policy for the reactor

2011-07-27 Thread Itamar Turner-Trauring
On Wed, 2011-07-27 at 18:10 -0400, Glyph Lefkowitz wrote: Mostly though, an additional queue for non-reentrancy would be an ad-hoc special-case solution to one tiny part of the more general problem that reactor event ordering is a complete accident with unforseen consequences. If there were

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Itamar Turner-Trauring
On Mon, 2011-08-01 at 01:37 +0200, Laurens Van Houtven wrote: Have you tried ReconnectingClientFactory? The serial port API doesn't use factories, if I'm not mistaken. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

Re: [Twisted-Python] scaling with lots of clients

2011-08-03 Thread Itamar Turner-Trauring
I have a twisted Perspective Broker based server. Recently with an increased number of clients we are seeing a decrease in throughput. Profiling the server it seems that it is spending the majority of time sending messages to the clients (unsuprisingly). PyPy might speed this up quite a bit;

Re: [Twisted-Python] A problem with very long blocking thread in Twisted

2011-08-10 Thread Itamar Turner-Trauring
To solve this problem, I'd like to set threads as daemon. So that all related threads are terminated when main loop is interrupted. Any idea on this problem will be appreciated. I've seen daemon threads causing core dumps on shutdown. Better to either use a library that doesn't use threads

  1   2   3   4   >