[Twisted-Python] Noob Question

2009-03-14 Thread Shelby Ramsey
Hello: I've been playing with twisted (to take advantage of deferreds) and trying to accomplish this: -- log into a machine as a client -- send auth -- receive "events" from the machine The events have a Content-Length: \d+ as the protocol for determining the length of the message. What I'

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Peter Sabaini
On Saturday 14 March 2009 18:33:02 Shelby Ramsey wrote: > Hello: > > I've been playing with twisted (to take advantage of deferreds) and trying > to accomplish this: > -- log into a machine as a client > -- send auth > -- receive "events" from the machine > > The events have a Content-Length:

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Shelby Ramsey
Peter, Thanks for the quick response. The issue isn't grabbing the content length ... but rather grabbing the body ... The protocol is TCP so the text (not binary) comes in streams ... so the body is / might be broken into streams ... so I'm trying to figure out how to "receive" the content leng

[Twisted-Python] Re: Noob Question

2009-03-14 Thread David Bolen
Shelby Ramsey writes: > The events have a Content-Length: \d+ as the protocol for determining the > length of the message. What I'm struggling with is how to parse that and > then receive just that length as an individual message ... It would probably help to see the general framework of your s

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Peter Sabaini
On Saturday 14 March 2009 19:54:04 Shelby Ramsey wrote: > Peter, > > Thanks for the quick response. The issue isn't grabbing the content length > ... but rather grabbing the body ... > > The protocol is TCP so the text (not binary) comes in streams ... so the > body is / might be broken into strea

Re: [Twisted-Python] Re: Noob Question

2009-03-14 Thread Shelby Ramsey
Thanks David! That looks like the trick ... I'll give it a try. SDR ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Shelby Ramsey
Peter, Thanks for the help. Yes I get a header and then am looking to extract the body. So to make sure I understand: p = compile('Content-Length:\s(\d+)') class SomeClient(basic.LineReceiver): def connectionMade(self): self.transport.write('login: info\r\n\r\n') # log in ... then

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Peter Sabaini
On Saturday 14 March 2009 22:12:49 Shelby Ramsey wrote: > Peter, > > Thanks for the help. Yes I get a header and then am looking to extract the > body. > > So to make sure I understand: > > p = compile('Content-Length:\s(\d+)') Of course I dont know anything about your protocol, but anyways: > c

[Twisted-Python] Weekly Bug Summary

2009-03-14 Thread exarkun
Bug summary __ Summary for 2009-03-08 through 2009-03-15 Bugs opened: 10Bugs closed: 3 Total open bugs: 1052 (+7) |== Type Changes |== Priority Changes |== Component Changes |Defect: +5 |Highest: +1 |Conch:+1 |Enhancement: +2 |No