Re: [Twisted-Python] Noob Question

2009-03-15 Thread Shelby Ramsey
Peter, The content length is just the body ... and I've been looking for 2 hours on how to change the delimiter. That did the trick. I think I'm on my way now! Thanks for heads up on pdb ... I've been writing stuff in Python for 3 years ... still learn something new daily. SDR

Re: [Twisted-Python] Noob Question

2009-03-15 Thread Peter Sabaini
On Sunday 15 March 2009 14:55:25 Shelby Ramsey wrote: > Peter, > > Thanks for the assistance. I think you and David have me on the right > path. Just to clarify the protocol looks like this: > > Content-Length: 984 > Content-Type: text/event-xml > > > >$bunchofinfo ... > > > > Where t

Re: [Twisted-Python] Noob Question

2009-03-15 Thread Shelby Ramsey
Jean-Paul: I wish I could ... I would certainly make this a little simpler. Unfortunately it's not an option. I don't have any control over the protocol. Thanks! SDR ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix

Re: [Twisted-Python] Noob Question

2009-03-15 Thread Jean-Paul Calderone
On Sun, 15 Mar 2009 08:55:25 -0500, Shelby Ramsey wrote: Peter, Thanks for the assistance. I think you and David have me on the right path. Just to clarify the protocol looks like this: Hi Shelby, You may want to consider re-using an existing protocol rather than inventing and implementing

Re: [Twisted-Python] Noob Question

2009-03-15 Thread Shelby Ramsey
Peter, Thanks for the assistance. I think you and David have me on the right path. Just to clarify the protocol looks like this: Content-Length: 984 Content-Type: text/event-xml $bunchofinfo ... Where the body (and the content length) start and stop with the ... . Here is what I'

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

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 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] 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

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: