Re: [Twisted-Python] asynchronous response

2015-12-18 Thread Marco Giusti
On Thu, Dec 17 2015, Amber "Hawkie" Brown wrote: > > > On 17 Dec 2015, at 08:11, Kevin Mcintyre wrote: > > > > Hey - I'm confused, so nothing new :) ...but I'm running at this > > example and I'm scratching my head. > > > > http://twistedmatrix.com/documents/current/web/howto/web-in-60/asynchro

Re: [Twisted-Python] raw socket IWriteDescriptor

2013-10-01 Thread Marco Giusti
On Tue, Oct 01, 2013 at 01:05:47AM -0700, David Stainton wrote: > I add the socket to the reactor in the constructor like this: > reactor.addWriter(self) > BTW is that OK? Or is it better to add it to the reactor outside of the > constructor? twisted.internet.stdio.StandardIO do that so it is not

Re: [Twisted-Python] Simple bidirectional Socket Client

2013-06-14 Thread Marco Giusti
On Fri, Jun 14, 2013 at 02:11:20PM +0200, Raketenschnitzel wrote: ... > class Communicator(ClientFactory): > protocol = ControllerProtocol > > def __init__(self, Host, Port): > if isinstance(Host, str) and isinstance(Port, int) : > self.myHost = Host > self.

Re: [Twisted-Python] Twisted client memory leak

2013-01-22 Thread Marco Giusti
On Tue, Jan 22, 2013 at 10:18:13AM -0300, Diego Woitasen wrote: > Here is the server code if you want to have a test: [cut] > > Thanks! > > On Tue, Jan 22, 2013 at 10:06 AM, Diego Woitasen > wrote: > > I have an Twisted client app that makes hundreds of connections per > > minute. I discover th

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-10 Thread Marco Giusti
On Thu, Jan 10, 2013 at 12:34:57PM +0200, Adi Roiban wrote: > On 10 January 2013 12:00, Marco Giusti wrote: > [snip] > >> My AvatarID Object is just for data. > >> > >> Let me describe one of my usage/requirement: > >> > >> I have a port

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-10 Thread Marco Giusti
On Thu, Jan 10, 2013 at 11:00:06AM +0100, Marco Giusti wrote: [cut] > > Can't you use `Portal.login` interfaces paramenter? I think you have two > different entry points for local and application accounts, so: > > # login as local account > portal.login('j

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-10 Thread Marco Giusti
On Thu, Jan 10, 2013 at 12:27:04AM +0200, Adi Roiban wrote: > On 9 January 2013 20:02, Glyph wrote: > > On Jan 9, 2013, at 9:26 AM, Peter Westlake wrote: > > > > I am not an expert in Twisted, but from my understanding, the "string" > > requirement is there to provide a plugable interface. So tha

Re: [Twisted-Python] when to use callInThread?

2011-05-07 Thread Marco Giusti
On Sat, May 07, 2011 at 04:49:22PM +0800, Dfgqq Dfgqq wrote: > Hi all > >I have a function like: > > def longQuery(xxx) > > this function will be invoked simultaneously (it means multiple thread > environment) and this function may take a while to complete. > > so my question is whether i s

Re: [Twisted-Python] twisted daemonize problem

2010-11-09 Thread Marco Giusti
On Tue, Nov 09, 2010 at 06:58:05AM -0500, Neal Becker wrote: > Thanks for the suggestions. > > I'd also like to add authentication, but it seems rather daunting. You should not. Add basic or digest authentication is really easy. Take a look at Calderone's Twisted Web in 60 seconds: HTTP authentic

Re: [Twisted-Python] twisted daemonize problem

2010-11-08 Thread Marco Giusti
On Mon, Nov 08, 2010 at 01:50:38PM -0500, Neal Becker wrote: > I seem to have things working OK with twistd. > > My app is a batch scheduling system that listens for commands via xmlrpc. > It is very simple at this point, and I'm attaching it. I would welcome any > suggestions for improvement,

Re: [Twisted-Python] twisted daemonize problem

2010-11-08 Thread Marco Giusti
On Mon, Nov 08, 2010 at 09:49:44AM -0500, Neal Becker wrote: > Itamar Turner-Trauring wrote: > >> 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

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

2010-10-21 Thread Marco Giusti
On Thu, Oct 21, 2010 at 05:02:03PM +1000, Stephen Thorne wrote: > On 2010-10-21, Marco Giusti wrote: > > On Wed, Oct 20, 2010 at 08:00:54PM -0400, David Ripton wrote: > > > On 10/20/10 17:10, Laurens Van Houtven wrote: > > > > > > > Feedback is welcome: do

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

2010-10-20 Thread Marco Giusti
On Wed, Oct 20, 2010 at 08:00:54PM -0400, David Ripton wrote: > On 10/20/10 17:10, Laurens Van Houtven wrote: > > > Feedback is welcome: do you think the layout or relative sizes should be > > changed? Is the apostrophe being missing okay? > > I think the missing apostrophe looks bad. Stupid que

Re: [Twisted-Python] My twisted application could not start after reboot be cause of "twistd.pid"

2010-03-15 Thread Marco Giusti
On Mon, Mar 15, 2010 at 06:32:23PM +0800, Peter Cai wrote: > Someone turn off the server by cutting power of the server. > When the machine is power on, I found my twisted application could not start > and emit the following error. > > Another twistd server is running, PID 3398 > > This could eit

Re: [Twisted-Python] What is the right way to pass variables from Site to Resource?

2010-03-01 Thread Marco Giusti
On Mon, Mar 01, 2010 at 04:47:49PM +, markscottwri...@gmail.com wrote: > I've got some global state and configuration information. It seems > to me that they ought to be members of my Site, but I don't see any > obvious way in a Resource.render_* to get the current Site. Neither > Request nor R

Re: [Twisted-Python] Nevow question

2010-02-19 Thread Marco Giusti
On Fri, Feb 19, 2010 at 03:17:07PM +1100, Sury Soni wrote: > Hi, > > How do we disable traceback on Nevow production site? > > Right now, by default, any nevow site will print full length of > traceback on web browser if there is some exception within the > application. [cut] something like this

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-10 Thread Marco Giusti
On Wed, Feb 10, 2010 at 12:22:59PM -0500, Darren Govoni wrote: > Hi, > Is there an existing protocol that can provide the following? > > - Accept stream binary data FROM a client (e.g. very large file > transfer) HTTP and FTP just to say two of many, > - Receive data IN ORDER (i.e. stream. not

Re: [Twisted-Python] Lore to Sphinx Conversion Progress Report

2009-11-30 Thread Marco Giusti
On Mon, Nov 30, 2009 at 03:05:30PM -0600, Kevin Horn wrote: > [...] > Thanks for "listening"! some notices about what i get[1]. mainly i'd like if you could make the documentation more readable when the browser's window is not really big. usually i do not use the browser with the window maximized

Re: [Twisted-Python] Caching mechanism

2009-11-16 Thread Marco Giusti
On Mon, Nov 09, 2009 at 06:24:20PM -0500, vit...@synapticvision.com wrote: > > Such global variable(lets say dictionary) will have any size limit? i don't know what kind of method calls do you need to cache, but what about of memcached? twisted got a really handy client api for memcached and, you