Re: [Twisted-Python] Getting started on making the move to the new logging system

2015-04-28 Thread Eeshan Garg
Hi Glyph! My apologies for misunderstanding! I'll try my best and make sure that does not happen again. I am counting on you and the members of this community to be severely critical of me if I go down a path that I should not be taking, and this community can count on me in the sense that I'll i

Re: [Twisted-Python] Announcing Eliot 0.7: Logging for complex and distributed systems (with nice Twisted support)

2015-04-28 Thread Itamar Turner-Trauring
On 2015-04-28 18:15, Glyph Lefkowitz wrote: > You could probably make it look even cooler by using unicode line-drawing > characters :-). Jonathan Jacobs is responsible for the neat UI. > Also, is there a web frontend which can render these? Will there be? Since the underlying structure i

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Jessica Tsui
Hi glyph, Thanks for your quick note. Even though I do not have deep understanding in Twisted, based on the documentation I have read I truly think that Twisted can be used on a more front-end stuff and I hope that it will work out well for this testing project, so that i can work further on it la

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Glyph Lefkowitz
> On Apr 28, 2015, at 8:14 AM, Jessica Tsui wrote: > > I am working on this messaging app and I would like to pass data from one > factory to another. Hi Jessica, I will hopefully have more useful feedback for you when I have a chance to read the whole thread (if others haven't answered all

Re: [Twisted-Python] Announcing Eliot 0.7: Logging for complex and distributed systems (with nice Twisted support)

2015-04-28 Thread Glyph Lefkowitz
> On Apr 28, 2015, at 1:57 PM, Itamar Turner-Trauring > wrote: > > Imagine you have a client that sends a request to a server and gets back a > 500 error. What caused it? If you're using Eliot you can trace the logs > across processes: > > > $ cat server.log client.log | python eliottree.py

Re: [Twisted-Python] Getting started on making the move to the new logging system

2015-04-28 Thread Glyph Lefkowitz
> On Apr 27, 2015, at 9:12 PM, Eeshan Garg wrote: > > Hello, Glyph! :-) > > My initial suggestion - don't take this too authoritatively, I'd be happy for > input from anyone else - would be that the next step would be to simply > identify a module that has some interesting log events, make a

Re: [Twisted-Python] revisiting onboarding

2015-04-28 Thread Glyph Lefkowitz
Can you send me an iCalendar invite of some kind to give you all the relevant permissions? I would definitely like to volunteer to do it, but if we don't have a specific time, I will 100% guarantee you that I will forget :). -glyph P.S.: I've been setting a bad example, but we should generally

Re: [Twisted-Python] revisiting onboarding

2015-04-28 Thread Chris Wolfe
Sure! I can only think of three things that need to be done: 1. Add a wiki page detailing the process you proposed. It may be helpful to display an example email showing what should be included in a new contributor request. The following pages should have links to the new policy: - https://twist

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Jessica Tsui
Hi Pantelis, sorry for bothering you again. But I just ran the code and it still has error with the line self.factory.app.echoFactory().dataReceived(receivermessage) as well as for echoer in self.factory.app.multiechofactory.echoers the errors are 'ServerApp' object has no attribute 'echoFactory'

[Twisted-Python] Announcing Eliot 0.7: Logging for complex and distributed systems (with nice Twisted support)

2015-04-28 Thread Itamar Turner-Trauring
Imagine you have a client that sends a request to a server and gets back a 500 error. What caused it? If you're using Eliot you can trace the logs across processes: $ cat server.log client.log | python eliottree.py e076ca50-9abc-44b2-95d8-85cf6956bc33 +-- main@1/started |-- process: client

Re: [Twisted-Python] Looking for some advice debugging issue with transport.write calls

2015-04-28 Thread Glyph Lefkowitz
> On Apr 28, 2015, at 10:55 AM, Brian Costlow wrote: > > Okay, figured this out. Glad to hear it! > Abstract of the issue: I am a dumbass. We all make mistakes. And a lot of people make this specific one :-). > First, Itamar gets to thrash me soundly, No need for violence! > as there was

Re: [Twisted-Python] revisiting onboarding

2015-04-28 Thread Glyph Lefkowitz
I think we can consider it tacitly accepted by the community (nobody seemed to object) but we still don't have anyone to implement it. Do you want to step up to do that? :) -g > On Apr 27, 2015, at 6:04 PM, Chris Wolfe wrote: > > Hi, > > Has this proposal been accepted? Is there anything I c

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Pantelis Theodosiou
That's what happens when one doesn't try running the code he suggests, sorry. It should be self.factory.app... : for echoer in self.factory.app.multiechofactory.echoers: echoer.dataReceived(sendermessage) On Tue, Apr 28, 2015 at 7:41 PM, Jessica Tsui wrote: > Pantel

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Jessica Tsui
Pantellis thank you so much for your guide! I am still quite unfamiliar with python and twisted so I made all kind of silly mistakes and could not figure out how to fix them I tried your code, it seems to me that it should be working with by referencing the factories as well as the self.app...Unfo

Re: [Twisted-Python] Looking for some advice debugging issue with transport.write calls

2015-04-28 Thread Brian Costlow
Okay, figured this out. Abstract of the issue: I am a dumbass. First, Itamar gets to thrash me soundly, as there was a bug in some code (not shown in my example) that is not properly tested. That code was responsible for "turning off" the protocol instance if connectionLost method was called, by

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Pantelis Theodosiou
On Tue, Apr 28, 2015 at 6:46 PM, Pantelis Theodosiou wrote: > No, I don't think that would work. > > You would need something like changing these lines: > > reactor.listenTCP(8000, EchoFactory(self)) # for sender > reactor.listenTCP(8001, MultiEchoFactory(self)) # for receiver >

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Pantelis Theodosiou
No, I don't think that would work. You would need something like changing these lines: reactor.listenTCP(8000, EchoFactory(self)) # for sender reactor.listenTCP(8001, MultiEchoFactory(self)) # for receiver to: self.echofactory = EchoFactory(self) self.multiecho

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Jessica Tsui
Hi Daniel, Thank you so much for your suggestion. I am quite new to python and twisted so I am not very certain about how to make it work well. Does that mean if I change the dataReceived by adding a line to instantiate the MultiEchoFactory like this, it will work? def dataReceived(self, data):

Re: [Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Louis D. Burr
Hi Jessica, > On Apr 28, 2015, at 10:14 AM, Jessica Tsui wrote: SNIP > exceptions.AttributeError: MultiEcho instance has no attribute ‘factory' SNIP > MultiEcho().dataReceived(sendermessage) Here you create an instance of the protocol directly, i.e., without having instantiated a MutilEchoFacto

[Twisted-Python] attribute error when I am trying to make one factory to send data to another

2015-04-28 Thread Jessica Tsui
I am working on this messaging app and I would like to pass data from one factory to another. I have been referencing to other answers provided in other similar questions by trying to add a variable storing the data from one factory then initiate another factory and write the data to it. Unfortunat

Re: [Twisted-Python] Looking for some advice debugging issue with transport.write calls

2015-04-28 Thread Brian Costlow
On Mon, Apr 27, 2015 at 4:55 PM, Glyph Lefkowitz wrote: > > Nothing strikes me as obviously wrong about this code (except the > "deferToThread" which seems *slightly* > suspicious, since nothing in the example appears to have anything to do > with threads, and whenever you get threads involved th