Re: [Twisted-Python] getPeer() inside conch

2009-09-28 Thread Glyph Lefkowitz
On Mon, Sep 28, 2009 at 8:10 PM, Benjamin Rutt wrote: > But, it seems the recvline.HistoricRecvLine class wants me to use > self.terminal rather than self.transport to talk to the client. That's > fine, but it seems that self.terminal lacks a getPeer() method. How do I > find out the IP addres

[Twisted-Python] getPeer() inside conch

2009-09-28 Thread Benjamin Rutt
Hello. I'm moderately experienced with twisted, and am starting out writing an ssh server using conch. I'm writing a protocol which inherits from the recvline.HistoricRecvLine class. It has connectionMade() and lineReceived() methods so it feels a lot like the twisted.protocols.basic.LineReceiver

Re: [Twisted-Python] Boston Twisted Sprint

2009-09-28 Thread Christopher Armstrong
On Fri, Sep 25, 2009 at 1:58 PM, Jessica McKellar wrote: > This sounds like plenty of support for a Sprint! People have mostly > expressed an ability to attend Monday, Tuesday, and Wednesday, so it seems I'll see everyone there tonight. -- Christopher Armstrong http://radix.twistedmatrix.com/

[Twisted-Python] reactor blocked

2009-09-28 Thread Jacopo Pecci
How could I get the first result as soon as ready and therefore parallelize things? I don’t want to block the reactor with further processing if It has some results ready to be redurned. thanks, Jacopo SERVER: fibo=Fibonacci() fact=pb.PBServerFactory(fibo) reactor.listenTCP(port, fact) reactor.r

[Twisted-Python] PostgreSQL LISTEN NOTIFY example?

2009-09-28 Thread Steve
My first message was sent as an HTML attachment - sorry! Hello, this is my first post to this list. I only started exploring Twisted less than a week ago. One thing that I would like to do is trigger a function via the PostgreSQL NOTIFY mechanism. Does anyone have an example or link to an exam

[Twisted-Python] PostgreSQL LISTEN NOTIFY Example?

2009-09-28 Thread Steve
Hello, this is my first post to this list. I only started exploring Twisted less than a week ago.One thing that I would like to do is trigger a function via the PostgreSQL NOTIFY mechanism.Does anyone have an example or link to an example of how to correctly do this? I have something working but I

Re: [Twisted-Python] Having touble with spread.pb un-serializing an object

2009-09-28 Thread exarkun
On 25 Sep, 03:42 am, b...@intelerad.com wrote: >Hi Jean-Paul, > >Here is a sample server and client code that demonstrates the problem >with PB's unserialization code and objects that use __slots__. The >SlotsObject class implements __slots__ and the NoSlotsObject does not. >The problem arises whe

[Twisted-Python] Twisted and db table changes

2009-09-28 Thread gary clark
Hello, I have a server that needs to track changes on a table database. When a table changes it needs the server accesses the table and send data out. Not sure what the best approach to do this in twisted. Do I create a thread in twisted and monitor for any changes in a table or can I create a

Re: [Twisted-Python] Knowing end of packet

2009-09-28 Thread gary clark
Marvelous. Much appreciated. "from twisted.protocols.basic import NetstringReceiver" Thanks, Garyc --- On Mon, 9/28/09, Glyph Lefkowitz wrote: > From: Glyph Lefkowitz > Subject: Re: [Twisted-Python] Knowing end of packet > To: "Twisted general discussion" > Date: Monday, September 28, 2009,

Re: [Twisted-Python] Knowing end of packet

2009-09-28 Thread Glyph Lefkowitz
On Mon, Sep 28, 2009 at 7:15 AM, gary clark wrote: > Hello, > > I am sending a large amount of data to a twisted server. I want to know how > the protocol class knows that no more data is to be received. > > I dont pass the length of the data in the packet, hence I'm looking for a > termination f

[Twisted-Python] Knowing end of packet

2009-09-28 Thread gary clark
Hello, I am sending a large amount of data to a twisted server. I want to know how the protocol class knows that no more data is to be received. I dont pass the length of the data in the packet, hence I'm looking for a termination field in the packet.Like . I did see a logging class but not su